Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.11.1
LEADTOOLS Raster Imaging C DLL Help

DOCWRTPDFOPTIONS

Show in webframe

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 EncryptionMode;
   L_BOOL bPrintEnabled;
   L_BOOL bHighQualityPrintEnabled;
   L_BOOL bCopyEnabled;
   L_BOOL bEditEnabled;
   L_BOOL bAnnotationsEnabled;
   L_BOOL bAssemblyEnabled;
   DOCWRT1BITIMGCOMP OneBitCompression;
   DOCWRTCOLORIMGCOMP ColorImgCompression;
   L_INT nQualityFactor;
   DOCWRTPDFBOOKMARK PdfBookmark;
   L_UINT32 uFlags;
} DOCWRTPDFOPTIONS, *pDOCWRTPDFOPTIONS;

The DOCWRTPDFOPTIONS structure provides information about PDF document files.

Member

Description

Options

DOCWRTOPTIONS 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.

 

DOCWRTPDFPROFILE_PDF16

[5] The created file will be Pdf v1.6 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

Creates an image over text PDF document.

 

FALSE

Creates a regular PDF document.

bLinearized

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

 

Value

Meaning

 

TRUE

Creates a fast web view PDF document.

 

FALSE

Creates a regular PDF document.

pwszTitle

Character string that contains the title of the PDF document.

pwszSubject

Character string that contains the subject of the created PDF document.

pwszKeywords

Character string that contains the keywords for the created PDF document.

pwszAuthor

Character string that contains the author of the created PDF document.

bProtected

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

 

Value

Meaning

 

TRUE

Creates a protected PDF document.

 

FALSE

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

pszUserPassword

Character string that contains the user password to be used for opening/reading PDF file.

pszOwnerPassword

Character string that contains the owners password which is used when changing the rights of the PDF document.

 

EncryptionMode

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

 

Value

Meaning

 

DOCWRTPDFENCRYPTIONMODE_RC128BIT

Uses High level encryption (128-bit RC4).

 

DOCWRTPDFENCRYPTIONMODE_RC40BIT

Uses 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

Allows printing for the PDF document.

 

FALSE

Disallows 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

Allows high resolution printing of the PDF document.

 

FALSE

Disallows 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

Allows text to be copied.

 

FALSE

Disallows text from being copied

 bEditEnabled

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

 

Value

Meaning

 

TRUE

Allows Editing.

 

FALSE

Disallows editing.

bAnnotationsEnabled

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

 

Value

Meaning

 

TRUE

Allows adding annotations.

 

FALSE

Disallows adding annotations.

 bAssemblyEnabled

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

 

Value

Meaning

 

TRUE

Allows adding/removing pages.

 

FALSE

Disallows adding/removing pages.

 

 OneBitCompression

Value that indicates the one bit image compression types. Possible values are:

 

Value

Meaning

 

DOCWRT1BITIMGCOMP_FLATE

[0] Uses flat compression for compressing one bit images.

 

DOCWRT1BITIMGCOMP_FAX_G31D

[1] Uses FAX G3_1D compression for compressing one bit images.

 

DOCWRT1BITIMGCOMP_FAX_G32D

[2] Uses FAX G3_2D compression for compressing one bit images.

 

DOCWRT1BITIMGCOMP_FAX_G4

[3] Uses FAX G4 compression for compressing one bit images.

 

DOCWRT1BITIMGCOMP_LZW

[4] Uses LZW compression for compressing one bit images.

 

DOCWRT1BITIMGCOMP_JBIG2

[5] Uses JBIG2 compression for compressing one bit images.

ColorImgCompression

Value that indicates the colored image compression types. Possible values are:

 

Value

Meaning

 

DOCWRTCOLORIMGCOMP_FLATE_JPEG

[0] Uses JPEG compression for images which are more than 8BPP, or for grayscale 8BPP, else use flat compression.

 

DOCWRTCOLORIMGCOMP_LZW_JPEG

[1] Uses JPEG compression for images which are more than 8BPP, or for grayscale 8BPP, else use LZW compression.

 

DOCWRTCOLORIMGCOMP_FLATE

[2] Uses flat compression for compressing colored images.

 

DOCWRTCOLORIMGCOMP_LZW

[3] Uses LZW compression for compressing colored images.

 

DOCWRTCOLORIMGCOMP_JPEG

[4] Uses JPEG compression for compressing colored images.

nQualityFactor

Number that determines the degree of loss in the compression process. The higher factor the smaller size, this work for JPEG compression only.

PdfBookmark

DOCWRTPDFBOOKMARK structure that contains settings for book marking PDF file.

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 then 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), 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 description options (author, title, subject and keywords) are available only for PDF and they are not supported for PDF/A.

The Bookmarks feature allows for the creation of bookmarks, which can be used to mark parts of a document for quick access. For more information refer to DOCWRTPDFBOOKMARK structure.

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

This structure is used with the L_DocWriterConvert and L_DocWriterInit functions.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.