10.07.2015 Views

Download - Multivac!

Download - Multivac!

Download - Multivac!

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Non-ASCII characters in passwords. Attention must be paid when characters outsidethe range 0x20-0x7E are used in passwords, i.e. characters which are not in the traditionalASCII character set. As an example, let’s take a look at the use of the character Äwithin a password. On the Mac this character has code 0x80, while on Windows it is encodedas 0xC4. Since users expect the file to be opened when using the password Ä oneither platform, Acrobat converts the supplied password to an internal encoding (calledPDFDocEncoding) before applying the password. Characters which are not available inthis encoding will be mapped to the space character. PDFDocEncoding contains all charactersof the Mac and Windows platforms, but requires several characters to be converted.In the example above, when the user encrypts the file with password Ä on the Mac,PDI would be unable to decrypt the file if the code for Ä would be used directly. PDItherefore applies the same password conversion as Acrobat in order to make sure thatfiles encrypted with Mac or Windows versions of Acrobat can successfully be decrypted.Upon decryption PDI will automatically detect the required conversion:> WinAnsi to PDFDocEncoding conversion if the document was encrypted with Acrobaton Windows or with PDFlib PLOP 2.1 or above;> MacRoman to PDFDocEncoding conversion if the document was encrypted with Acrobaton the Mac;> No conversion if the document was encrypted with some other software, includingPDFlib PLOP 2.0 (but not any newer versions).When encrypting files, PDFlib will act like Acrobat on Windows and interpret the suppliedpasswords in WinAnsi encoding, i.e., it will apply a WinAnsi to PDFDocEncodingconversion to the supplied user and master passwords; on EBCDIC platforms it will applyEBCDIC to WinAnsi conversion prior to that.Permissions. Access restrictions can be set with the permissions option in PDF_begin_document( ). It contains one or more access restriction keywords. When setting thepermissions option the masterpassword option must also be set, because otherwise Acrobatusers could easily remove the permission settings. By default, all actions are allowed.Specifying an access restriction will disable the respective feature in Acrobat. Accessrestrictions can be applied without any user password. Multiple restrictionkeywords can be specified as in the following example:p.begin_document(filename, "masterpassword=abc123 permissions={noprint nocopy}");Table 9.4 lists all supported access restriction keywords. As detailed in the table, somekeywords require PDF 1.4 or higher compatibility. They will be rejected if the PDF outputversion is too low.Cookbook A full code sample can be found in the Cookbook topic general/permission_settings.Table 9.4 Access restriction keywords for the permissions option in PDF_begin_document( )keywordnoprintnomodifynocopynoannotsexplanationAcrobat will prevent printing the file.Acrobat will prevent editing or cropping pages and creating or changing form fields.Acrobat will prevent copying and extracting text or graphics; the accessibility interface will be controlledby noaccessible.Acrobat will prevent creating or changing annotations and form fields.9.2 Encrypted PDF 199

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!