DOCWRTPDFOPTIONS

typedef struct _DOCWRTPDFOPTIONS
{
 DOCWRTOPTIONS Options;
 DOCWRTPDFPROFILE PdfProfile;
 DOCWRTFONTEMBED FontEmbed;
 L_BOOL bImageOverText;
 L_BOOL             bLinearized;     
 L_WCHAR           *pwszTitle;       
 L_WCHAR           *pwszSubject;     
 L_WCHAR           *pwszKeywords;    
 L_WCHAR           *pwszAuthor;
 L_BOOL             bProtected;      
 L_CHAR            *pszUserPassword;
 L_CHAR            *pszOwnerPassword;
 DOCWRTPDFENCRYPTIONMODE b128bit;         
 L_BOOL             bPrintEnabled;   
 L_BOOL             bHighQualityPrintEnabled;    
 L_BOOL             bCopyEnabled;    
 L_BOOL             bEditEnabled;    
 L_BOOL             bAnnotationsEnabled;   
 L_BOOL             bAssemblyEnabled;
 L_UINT32 uFlags;
} DOCWRTPDFOPTIONS, *pDOCWRTPDFOPTIONS;

The DOCWRTPDFOPTIONS structure provides information about PDF document files.

Member

Description

Options

Options structure that contains options for a PDF file.

PdfProfile

Value that indicates the PDF document type. Possible values are:

 

Value

Meaning

 

DOCWRTPDFPROFILE_PDF

[0] The created file will be a regular PDF v1.4 document.

 

DOCWRTPDFPROFILE_PDFA

[1] The created file will be a PdfA document.

 

DOCWRTPDFPROFILE_PDF12

[2] The created file will be Pdf v1.2 document.

 

DOCWRTPDFPROFILE_PDF13

[3] The created file will be Pdf v1.3 document.

 

DOCWRTPDFPROFILE_PDF15

[4] The created file will be Pdf v1.5 document.

FontEmbed

Value that indicates the Font embedding modes. Possible values are:

 

Value

Meaning

 

DOCWRTFONTEMBED_NOEMBED

[0] So not embed fonts

 

DOCWRTFONTEMBED_AUTO

[1] Embed fonts that are not commonly available with the exception of Licensed Fonts.

 

DOCWRTFONTEMBED_FORCE

[2] Embed fonts that are not commonly available with Licensed Fonts.

 

DOCWRTFONTEMBED_ALL

[3] Embed all fonts, including the Licensed Fonts with the document.

 

bImageOverText

Flag that indicates whether to create an image over text Pdf file. Possible values are:

 

Value

Meaning

 

TRUE

Create an image over text pdf document.

 

FALSE

Create a regular PDF document.

bLinearized

Flag that indicates whether to create fast web view pdf document. Possible values are:

Value

Meaning

TRUE

Create a fast web view PDF document.

FALSE

Create a regular PDF document.

pwszTitle

Character string containing the title of the PDF document.

pwszSubject

Character string containing the subject of the created PDF document.

pwszKeywords

Character string containing the keywords for the created PDF document.

pwszAuthor

Character string containing the author of the created PDF document.

bProtected

Flag to indicate whether to create protected (encrypted) PDF document. Possible values are:

Value

Meaning

TRUE

Create a protected PDF document.

FALSE

Create a PDF document with no protection (not encrypted).

 

pszUserPassword

Character string containing the user password which should be used for opening/reading

PDF file.

 

pszOwnerPassword

Character string containing the owner’s password. The owner password is used when changing the rights of the PDF document.

 

DOCWRTPDFENCRYPTIONMODE

Value that indicates the encryption level for the PDF document. Possible values are:

Value

Meaning

DOCWRTPDFENCRYPTIONMODE_RC128BIT

Use High level encryption (128-bit RC4).

DOCWRTPDFENCRYPTIONMODE_RC40BIT

Use Low level encryption (40-bit RC4).

 

bPrintEnabled

Flag that indicates whether to allow/disallow printing for the created PDF document. Possible values are:

Value

Meaning

TRUE

Allow printing for the pdf document.

FALSE

Disallow printing for the pdf document.

 

bHighQualityPrintEnabled

Flag that indicates whether to allow/disallow printing at high resolution for the created PDF document. This flag is available only for documents created with RC4 128-bit encryption. Possible values are:

Value

Meaning

TRUE

Allow high resolution printing of the PDF document.

FALSE

Disallow high resolution printing of the PDF document.

 

 

bCopyEnabled

Flag that indicates whether to allow/disallow copying text from created PDF documents. Possible values are:

Value

Meaning

TRUE

Allow text to be copied.

FALSE

Disallow text from being copied

 

 

bEditEnabled

Flag indicate whether to allow/disallow editing for the created PDF document. Possible values are:

Value

Meaning

TRUE

Allow Editing.

FALSE

Disallow editting.

 

 

bAnnotationsEnabled

Flag that indicates whether to allow/disallow adding comments/annotations for the created PDF document. Possible values are:

Value

Meaning

TRUE

Allow adding Annotations.

FALSE

Disallow adding Annotations.

 

bAssemblyEnabled

Flag that indicates whether to allow/disallow adding or removing pages from PDF document. Possible values are:

Value

Meaning

TRUE

Allow adding/removing pages.

FALSE

Disallow adding/removing pages.

 

 

uFlags

Flag that indicates the extra options for writing PDF files. Currently there are no flags. This is for future use.

 

 

 

 

 

Comments

pDOCWRTPDFOPTIONS is a pointer to DOCWRTPDFOPTIONS structure. Generally, where a function parameter type is pDOCWRTPDFOPTIONS, you can declare a DOCWRTPDFOPTIONS variable, update the structure's fields, and pass the variable's address in the parameter. Declaring a pDOCWRTPDFOPTIONS variable is necessary only if your program requires a pointer.

 

The Low Level encryption method (40-bit RC4), allows access for some PDF document areas to be restricted. The user may allow/disallow the following for the created PDF document: print document, modify document content, extract text and graphics, modify comments, etc.

 

The High Level Encryption method (128-bit RC4), beside allows you to have more restrictions beside the ones of the low level encryption method, so that the user here may allow/disallow printing high resolution and assemble the document.

 

User password is for opening/reading the PDF file. If you define the user password the resulting PDF file will be encrypted and you have to enter the user password to open it.

 

Owner password is used for changing the rights of the PDF document. When an owner password protected PDF document is viewed, the owner password is not requested, but it is requested when trying to change something in the password protected PDF file.

 

Also note that the pszUserPassword, pszOwnerPassword, DOCWRTPDFENCRYPTIONMODE, and Security permissions such as PrintEnabled, bHighQualityPrintEnabled, bCopyEnabled, bEditEnabled, bAnnotationsEnabled and bAssemblyEnabled only have effect if bProtected is true.

 

bAssemblyEnabled has effect only if the encryption level is high (128-bit RC4), while bHighQualityPrintEnabled has effect only if bPrintEnabled is true and the encryption level is high (128-bit RC4).

 

Fast web view (Linearization), Security options, and Pdf document descripton options (author, title, subject and keywords) are available only for Pdf and they are not supported for Pdf/A.

 

Before using the LEADTOOLS Document Writers SDK, unlock it using L_UnlockSupport. If you want to use the PDF format you must also unlock PDF support with L_UnlockSupport.

 

This structure is used with the L_DocWriterConvert and L_DocWriterInit functions.