Definitions for PDF basic and common process.
Definitions and functions in this module are included in fpdf_base_r.h.
Module: PDFBase
License Identifier: PDFBase/All
Available License Right: Unnecessary.
More...
Functions | |
FS_RESULT | FSCRT_PDFModule_Initialize () |
Initialize PDF module. More... | |
FS_RESULT | FSCRT_PDFModule_Finalize () |
Finalize PDF module. More... | |
FS_RESULT | FSPDF_RenderContext_Create (FSPDF_RENDERCONTEXT *pdfRenderContext) |
Create a PDF rendering context. More... | |
FS_RESULT | FSPDF_RenderContext_Release (FSPDF_RENDERCONTEXT pdfRenderContext) |
Release a PDF rendering context. More... | |
FS_RESULT | FSPDF_RenderContext_SetFlags (FSPDF_RENDERCONTEXT pdfRenderContext, FS_DWORD flags) |
Set flags to a rendering context. More... | |
FS_RESULT | FSPDF_RenderContext_SetMatrix (FSPDF_RENDERCONTEXT pdfRenderContext, const FSCRT_MATRIX *matrix) |
Set a transformation matrix to a rendering context. More... | |
FS_RESULT | FSPDF_RenderContext_SetHalftoneLimit (FSPDF_RENDERCONTEXT pdfRenderContext, FS_INT32 halftoneLimit) |
Set a halftone limit to a rendering context. More... | |
FS_RESULT | FSPDF_RenderContext_SetOption (FSPDF_RENDERCONTEXT pdfRenderContext, FS_DWORD option, FS_LPVOID params) |
Set option parameters to a rendering context. More... | |
FS_RESULT | FSPDF_RenderContext_SetLayerContext (FSPDF_RENDERCONTEXT pdfRenderContext, FSPDF_LAYERCONTEXT layerContext) |
Set layer context to render context handle. More... | |
FS_RESULT | FSPDF_ActionData_Init (FSPDF_ACTIONDATA *actionData) |
Initialize PDF action data. More... | |
FS_RESULT | FSPDF_ActionData_Clear (FSPDF_ACTIONDATA *actionData) |
Clear PDF action data. More... | |
FS_RESULT | FSPDF_Attachment_Create (FSCRT_DOCUMENT document, FSPDF_ATTACHMENT *attachment) |
Create an attachment object. More... | |
FS_RESULT | FSPDF_Attachment_Release (FSCRT_DOCUMENT document, FSPDF_ATTACHMENT attachment) |
Release a attachment object. More... | |
FS_RESULT | FSPDF_Attachment_IsEmbedded (FSPDF_ATTACHMENT attachment, FS_BOOL *embedded) |
Check whether an attachment is an embedded file or not. More... | |
FS_RESULT | FSPDF_Attachment_GetFileName (FSPDF_ATTACHMENT attachment, FSCRT_BSTR *fileName) |
Get file name of an attachment. More... | |
FS_RESULT | FSPDF_Attachment_SetFileName (FSPDF_ATTACHMENT attachment, const FSCRT_BSTR *fileName, FS_BOOL isURL) |
Set the file name of an attachment. More... | |
FS_RESULT | FSPDF_Attachment_GetDescription (FSPDF_ATTACHMENT attachment, FSCRT_BSTR *description) |
Get description of an attachment. More... | |
FS_RESULT | FSPDF_Attachment_SetDescription (FSPDF_ATTACHMENT attachment, const FSCRT_BSTR *description) |
Set the description of an attachment. More... | |
FS_RESULT | FSPDF_Attachment_GetSize (FSPDF_ATTACHMENT attachment, FSCRT_FILESIZE *size) |
Get the size of an attachment. More... | |
FS_RESULT | FSPDF_Attachment_GetCreationDateTime (FSPDF_ATTACHMENT attachment, FSCRT_DATETIMEZONE *dt) |
Get creation date and time of an attachment. More... | |
FS_RESULT | FSPDF_Attachment_SetCreationDateTime (FSPDF_ATTACHMENT attachment, const FSCRT_DATETIMEZONE *dt) |
Set the creation date and time of an attachment. More... | |
FS_RESULT | FSPDF_Attachment_GetModifiedDateTime (FSPDF_ATTACHMENT attachment, FSCRT_DATETIMEZONE *dt) |
Get the last modification date and time of an attachment. More... | |
FS_RESULT | FSPDF_Attachment_SetModifiedDateTime (FSPDF_ATTACHMENT attachment, const FSCRT_DATETIMEZONE *dt) |
Set the modification date of an attachment. More... | |
FS_RESULT | FSPDF_Attachment_GetCheckSum (FSPDF_ATTACHMENT attachment, FSCRT_BSTR *checksum) |
Get an attachment's checksum. More... | |
FS_RESULT | FSPDF_Attachment_SetCheckSum (FSPDF_ATTACHMENT attachment, const FSCRT_BSTR *checksum) |
Set the checksum of an attachment. More... | |
FS_RESULT | FSPDF_Attachment_WriteToFile (FSPDF_ATTACHMENT attachment, FSCRT_FILE file) |
Write the attachment data directly into a file. More... | |
FS_RESULT | FSPDF_Attachment_GetData (FSPDF_ATTACHMENT attachment, FS_BOOL isRawData, FSCRT_FILE *file) |
Get the attachment data with an asynchronous way. More... | |
FS_RESULT | FSPDF_Attachment_SetFile (FSPDF_ATTACHMENT attachment, FSCRT_FILE file) |
Set the file of an attachment. More... | |
FS_RESULT | FSPDF_Attachment_GetDocument (FSPDF_ATTACHMENT attachment, FSCRT_DOCUMENT *document) |
Get a document handle related to an attachment. More... | |
FS_RESULT | FSPDF_Font_IsEmbedded (FSCRT_DOCUMENT document, FSCRT_FONT font, FS_BOOL *isEmbedded) |
Check whether a font is embedded in a PDF document. More... | |
FS_RESULT | FSPDF_Font_GetDict (FSCRT_DOCUMENT document, FSCRT_FONT font, FSPDF_OBJECT *fontDictionary) |
Get the dictionary of a font in a PDF document. More... | |
FS_RESULT | FSPDF_Font_IsSupportEmbedded (FSCRT_DOCUMENT document, FSCRT_FONT font, FS_BOOL *isSupported) |
Check whether all features of the font can be embedded to a specific PDF document or not. More... | |
Macro Definitions for PDF Document Permissions | |
| |
#define | FSPDF_PERMISSION_PRINT 0x0004 |
Bit 3. Print PDF document with normal mode. More... | |
#define | FSPDF_PERMISSION_MODIFY 0x0008 |
Bit 4. Modify PDF contents. More... | |
#define | FSPDF_PERMISSION_EXTRACT 0x0010 |
Bit 5. Extract PDF contents. More... | |
#define | FSPDF_PERMISSION_ANNOTFORM 0x0020 |
Bit 6. Operate text annotations and fill in interactive form fields. More... | |
#define | FSPDF_PERMISSION_FILLFORM 0x0100 |
Bit 9. Fill PDF form. More... | |
#define | FSPDF_PERMISSION_EXTRACTACCESS 0x0200 |
Bit 10. Disabilities support. More... | |
#define | FSPDF_PERMISSION_ASSEMBLE 0x0400 |
Bit 11. Assemble PDF document. More... | |
#define | FSPDF_PERMISSION_PRINT_HIGH 0x0800 |
Bit 12. Print PDF document with higher qualities. More... | |
Macro Definitions for Page Boundary Box | |
| |
#define | FSPDF_PAGEBOX_MEDIABOX 0 |
Media Box for page boundary. More... | |
#define | FSPDF_PAGEBOX_CROPBOX 1 |
Crop Box for page boundary. More... | |
#define | FSPDF_PAGEBOX_TRIMBOX 2 |
Trim Box for page boundary. More... | |
#define | FSPDF_PAGEBOX_ARTBOX 3 |
Art Box for page boundary. More... | |
#define | FSPDF_PAGEBOX_BLEEDBOX 4 |
Bleed Box for page boundary. More... | |
Macro Definitions for Alignments (horizontal). | |
#define | FSPDF_ALIGNMENT_LEFT 0 |
Left alignment. | |
#define | FSPDF_ALIGNMENT_CENTER 1 |
Center alignment. | |
#define | FSPDF_ALIGNMENT_RIGHT 2 |
Right alignment. | |
Macro Definitions for Settings of Default Appearance | |
#define | FSPDF_DEFAULTAPPEARANCE_FONT 0x0001 |
The font flag of default appearance. | |
#define | FSPDF_DEFAULTAPPEARANCE_TEXTCOLOR 0x0002 |
The text color flag of default appearance. | |
#define | FSPDF_DEFAULTAPPEARANCE_TEXTMATRIX 0x0004 |
The text matrix flag of default appearance flag. | |
Macro Definitions for Rendering Options | |
| |
#define | FSPDF_RENDEROPTION_COLORMODE 0 |
Rendering option of color mode. | |
Macro Definitions for Rendering Option of Color Mode | |
#define | FSPDF_COLORMODE_NORMAL 0 |
Normal color mode. | |
#define | FSPDF_COLORMODE_GRAY 1 |
Gray color mode: map colors to background/foreground. | |
#define | FSPDF_COLORMODE_TWOCOLOR 2 |
Two color mode: map white/black to background/foreground, other unchanged. | |
Macro Definitions for Render Flags | |
| |
#define | FSPDF_RENDERCONTEXTFLAG_ANNOT 0x0001 |
Set if page annotations are to be rendered together. | |
#define | FSPDF_RENDERCONTEXTFLAG_DROPOBJECTS 0x0002 |
Drop page content objects while rendering page automatically. More... | |
#define | FSPDF_RENDERCONTEXTFLAG_NOWIDGET 0x0004 |
Set if the form fields(widgets) are not to be rendered together. | |
#define | FSPDF_RENDERCONTEXTFLAG_NOTTRANSFORMICON 0x0008 |
Set if no need to rotate or scale annotation icon. More... | |
#define | FSPDF_RENDERCONTEXTFLAG_NOSIGNATURE 0x0020 |
This flag indicates not to render signatures. | |
#define | FSPDF_RENDERCONTEXTFLAG_OCGPRINT 0x0100 |
If this flag is set, only apply those content objects which allow to output to printer. | |
#define | FSPDF_RENDERCONTEXTFLAG_OCGDESIGN 0x0200 |
If this flag is set, only apply those content objects which allow to output for design mode. | |
#define | FSPDF_RENDERCONTEXTFLAG_OCGEXPORT 0x0400 |
If this flag is set, only apply those content objects which allow to output for exportation. | |
Macro Definitions for Zoom Mode for The Destination | |
#define | FSPDF_ZOOM_FACTOR 1 |
A specific zoom factor is used. | |
#define | FSPDF_ZOOM_FITPAGE 2 |
Fit the whole page on the screen. | |
#define | FSPDF_ZOOM_FITWIDTH 3 |
Fit the width of the page on the screen. | |
#define | FSPDF_ZOOM_FITHEIGHT 4 |
Fit the height of the page on the screen. | |
#define | FSPDF_ZOOM_FITRECT 5 |
Fit a particular rectangle on the screen. | |
#define | FSPDF_ZOOM_FITCONTENT 6 |
Fit the whole content of page on the screen. | |
#define | FSPDF_ZOOM_FITCONTENTWIDTH 7 |
Fit the content width of page on the screen. | |
#define | FSPDF_ZOOM_FITCONTENTHEIGHT 8 |
Fit the content height of page on the screen. | |
Macro Definitions for Action Type | |
#define | FSPDF_ACTION_UNSUPPORTED 0 |
Unsupported action type. | |
#define | FSPDF_ACTION_GOTO 1 |
Go to a destination within current document. | |
#define | FSPDF_ACTION_REMOTEGOTO 2 |
Go to a destination within another document. | |
#define | FSPDF_ACTION_EMBEDDEDGOTO 3 |
Go to a destination within embedded another document. | |
#define | FSPDF_ACTION_URI 4 |
Universal Resource Identifier, including web pages and other Internet based resources. | |
#define | FSPDF_ACTION_LAUNCH 5 |
Launch an application or open a file. | |
#define | FSPDF_ACTION_JAVASCRIPT 6 |
Run a javascript. | |
#define | FSPDF_ACTION_HIDE 7 |
Hide or show one or more annotations. | |
#define | FSPDF_ACTION_NAMED 8 |
Run a named action. | |
#define | FSPDF_ACTION_SUBMITFORM 9 |
Transmit the names and values of selected interactive form fields. | |
#define | FSPDF_ACTION_RESETFORM 10 |
Reset selected interactive form fields to their default values. | |
#define | FSPDF_ACTION_IMPORTDATA 11 |
Import Forms Data Format (FDF) data into the document's interactive form. | |
#define | FSPDF_ACTION_RENDITION 12 |
Play a multimedia. | |
Macro Definitions for Trigger Actions of Document | |
#define | FSPDF_TRIGGER_DOC_DO 0 |
A JavaScript action to be performed after opening a document. | |
#define | FSPDF_TRIGGER_DOC_WC 1 |
A JavaScript action to be performed before closing a document. | |
#define | FSPDF_TRIGGER_DOC_WS 2 |
A JavaScript action to be performed before saving a document. | |
#define | FSPDF_TRIGGER_DOC_DS 3 |
A JavaScript action to be performed after saving a document. | |
#define | FSPDF_TRIGGER_DOC_WP 4 |
A JavaScript action to be performed before printing a document. | |
#define | FSPDF_TRIGGER_DOC_DP 5 |
A JavaScript action to be performed after printing a document. | |
Macro Definitions for Trigger Actions of Form Field | |
#define | FSPDF_TRIGGER_FORMFIELD_KS 0 |
A JavaScript action to be performed when the user types a keystroke into a text field or combo box or modifies the selection in a scrollable list box. More... | |
#define | FSPDF_TRIGGER_FORMFIELD_WF 1 |
A JavaScript action to be performed before the field is formatted to display its current value. More... | |
#define | FSPDF_TRIGGER_FORMFIELD_WV 2 |
A JavaScript action to be performed when the field's value is changed. More... | |
#define | FSPDF_TRIGGER_FORMFIELD_FC 3 |
A JavaScript action to be performed to recalculate the value of this field when that of another field changes. | |
Macro Definitions for Trigger Actions of Page | |
#define | FSPDF_TRIGGER_PAGE_PO 0 |
An action to be performed when the page is opened. | |
#define | FSPDF_TRIGGER_PAGE_PC 1 |
An action to be performed when the page is closed. | |
Macro Definitions for Trigger Actions of Annotation | |
#define | FSPDF_TRIGGER_ANNOT_CE 0 |
#define | FSPDF_TRIGGER_ANNOT_CX 1 |
#define | FSPDF_TRIGGER_ANNOT_MD 2 |
#define | FSPDF_TRIGGER_ANNOT_MU 3 |
#define | FSPDF_TRIGGER_ANNOT_FO 4 |
#define | FSPDF_TRIGGER_ANNOT_FL 5 |
#define | FSPDF_TRIGGER_ANNOT_PO 6 |
#define | FSPDF_TRIGGER_ANNOT_PC 7 |
#define | FSPDF_TRIGGER_ANNOT_PV 8 |
#define | FSPDF_TRIGGER_ANNOT_PI 9 |
Macro Definitions for Submit-Form Action Flags | |
| |
#define | FSPDF_SUBMITFORMFLAGS_INCLUDE 0x0001 |
Bit 1. Include fields to submit. | |
#define | FSPDF_SUBMITFORMFLAGS_INCLUDENOVALUEFIELDS 0x0002 |
Bit 2. Submit fields regardless of whether they have a value. More... | |
#define | FSPDF_SUBMITFORMFLAGS_EXPORTFORMAT 0x0004 |
Bit 3. Field names and values are submitted in HTML Form format. More... | |
#define | FSPDF_SUBMITFORMFLAGS_GETMETHOD 0x0008 |
Bit 4. Field names and values are submitted using an HTTP GET request. More... | |
#define | FSPDF_SUBMITFORMFLAGS_SUBMITCOORDINATES 0x0010 |
Bit 5. Coordinates of the mouse are transmitted as part of the form data. | |
#define | FSPDF_SUBMITFORMFLAGS_XFDF 0x0020 |
Bit 6. Field names and values are submitted as XFDF. | |
#define | FSPDF_SUBMITFORMFLAGS_INCLUDEAPPENDSAVES 0x0040 |
Bit 7. Submitted FDF file includes contents as contained in differences entry in the FDF dictionary. More... | |
#define | FSPDF_SUBMITFORMFLAGS_INCLUDEANNOTATIONS 0x0080 |
Bit 8. Submitted FDF file includes all markup annotations in underlying PDF document. More... | |
#define | FSPDF_SUBMITFORMFLAGS_SUBMITPDF 0x0100 |
Bit 9. The document is submitted as PDF. | |
#define | FSPDF_SUBMITFORMFLAGS_CANONICALFORMAT 0x0200 |
Bit 10. Any submitted field values representing dates are converted to the standard format. | |
#define | FSPDF_SUBMITFORMFLAGS_EXCLNONUSERANNOTS 0x0400 |
Bit 11. Only those markup annotations whose T entry matches the name of the current user are being submitted. | |
#define | FSPDF_SUBMITFORMFLAGS_EXCLFKEY 0x0800 |
Bit 12. Submitted FDF excludes F entry. | |
#define | FSPDF_SUBMITFORMFLAGS_EMBEDFORM 0x2000 |
Bit 14. F entry of submitted FDF is an embedded file stream. | |
Definitions for PDF basic and common process.
Definitions and functions in this module are included in fpdf_base_r.h.
Module: PDFBase
License Identifier: PDFBase/All
Available License Right: Unnecessary.
This module contains following features:
#define FSPDF_PAGEBOX_ARTBOX 3 |
Art Box for page boundary.
The intended dimensions of a finished page after trimming.
#define FSPDF_PAGEBOX_BLEEDBOX 4 |
Bleed Box for page boundary.
The extent of page's meaningful content (including potential white space) as intended by page's creator.
#define FSPDF_PAGEBOX_CROPBOX 1 |
Crop Box for page boundary.
The region to which the contents of page are to be clipped (cropped) while displaying or printing.
#define FSPDF_PAGEBOX_MEDIABOX 0 |
Media Box for page boundary.
The boundary of the physical medium on which page is to be displayed or printed.
#define FSPDF_PAGEBOX_TRIMBOX 2 |
Trim Box for page boundary.
The region to which the contents of page should be clipped while outputting in a production environment.
#define FSPDF_PERMISSION_ANNOTFORM 0x0020 |
Bit 6. Operate text annotations and fill in interactive form fields.
If bit 4 is also set, user can create or modify interactive form fields (including signature fields).
#define FSPDF_PERMISSION_ASSEMBLE 0x0400 |
Bit 11. Assemble PDF document.
This bit enables to assemble the document (insert, rotate, or delete pages and create bookmarks or thumbnail images), regardless if bit 4 is set or not.
#define FSPDF_PERMISSION_EXTRACT 0x0010 |
Bit 5. Extract PDF contents.
if this bit is set, the user can copy or otherwise extract text and graphics from the document by operations other than that controlled by bit 10.
#define FSPDF_PERMISSION_EXTRACTACCESS 0x0200 |
Bit 10. Disabilities support.
If this bit set, user can extract text and graphics in support of accessibility to users with disabilities or for other purposes.
#define FSPDF_PERMISSION_FILLFORM 0x0100 |
Bit 9. Fill PDF form.
if this bit is set, user can fill in interactive form fields (including signature fields), even if bit 6 is clear.
#define FSPDF_PERMISSION_MODIFY 0x0008 |
Bit 4. Modify PDF contents.
if this bit is set, the user can modify contents of PDF document by operations other than those controlled by bits 6, 9, and 11.
#define FSPDF_PERMISSION_PRINT 0x0004 |
Bit 3. Print PDF document with normal mode.
If the user wants to print a higher quality level of PDF document, set it with bit 12 together.
Please refer to macro FSPDF_PERMISSION_PRINT_HIGH.
#define FSPDF_PERMISSION_PRINT_HIGH 0x0800 |
Bit 12. Print PDF document with higher qualities.
If this bit is clear (and bit 3 is set), printing is limited to a low-level representation of the appearance, possibly of degraded quality.
#define FSPDF_RENDERCONTEXTFLAG_DROPOBJECTS 0x0002 |
Drop page content objects while rendering page automatically.
This will make the most complicated pages renderable within very limited memory.
HOWEVER, after rendering a page, page content objects will not be used any more, and user has to re-parse page for any process on page contents.
#define FSPDF_RENDERCONTEXTFLAG_NOTTRANSFORMICON 0x0008 |
Set if no need to rotate or scale annotation icon.
In PDF, "<b>Text</b>" and "<b>FileAttachment</b>" annotations show as icons.
#define FSPDF_SUBMITFORMFLAGS_EXPORTFORMAT 0x0004 |
Bit 3. Field names and values are submitted in HTML Form format.
#define FSPDF_SUBMITFORMFLAGS_GETMETHOD 0x0008 |
Bit 4. Field names and values are submitted using an HTTP GET request.
#define FSPDF_SUBMITFORMFLAGS_INCLUDEANNOTATIONS 0x0080 |
Bit 8. Submitted FDF file includes all markup annotations in underlying PDF document.
#define FSPDF_SUBMITFORMFLAGS_INCLUDEAPPENDSAVES 0x0040 |
Bit 7. Submitted FDF file includes contents as contained in differences entry in the FDF dictionary.
#define FSPDF_SUBMITFORMFLAGS_INCLUDENOVALUEFIELDS 0x0002 |
Bit 2. Submit fields regardless of whether they have a value.
#define FSPDF_TRIGGER_ANNOT_CE 0 |
brief An action to be performed when the cursor enters the annotation's active area.
#define FSPDF_TRIGGER_ANNOT_CX 1 |
brief An action to be performed when the cursor exits the annotation's active area.
#define FSPDF_TRIGGER_ANNOT_FL 5 |
brief An action to be performed when the annotation loses the input focus.
#define FSPDF_TRIGGER_ANNOT_FO 4 |
brief An action to be performed when the annotation receives the input focus.
#define FSPDF_TRIGGER_ANNOT_MD 2 |
brief An action to be performed when the mouse button is pressed inside the annotation's active area.
#define FSPDF_TRIGGER_ANNOT_MU 3 |
brief An action to be performed when the mouse button is released inside the annotation's active area.
#define FSPDF_TRIGGER_ANNOT_PC 7 |
brief An action to be performed when the page containing the annotation is closed.
#define FSPDF_TRIGGER_ANNOT_PI 9 |
brief An action to be performed when the page containing the annotation is no longer visible in the viewer application's user interface.
#define FSPDF_TRIGGER_ANNOT_PO 6 |
brief An action to be performed when the page containing the annotation is opened.
#define FSPDF_TRIGGER_ANNOT_PV 8 |
brief An action to be performed when the page containing the annotation becomes visible in the viewer application's user interface.
#define FSPDF_TRIGGER_FORMFIELD_KS 0 |
A JavaScript action to be performed when the user types a keystroke into a text field or combo box or modifies the selection in a scrollable list box.
This action can check the keystroke for validity and reject or modify it.
#define FSPDF_TRIGGER_FORMFIELD_WF 1 |
A JavaScript action to be performed before the field is formatted to display its current value.
This action can modify the field's value before formatting.
#define FSPDF_TRIGGER_FORMFIELD_WV 2 |
A JavaScript action to be performed when the field's value is changed.
This action can check the new value for validity.
FS_RESULT FSCRT_PDFModule_Finalize | ( | ) |
Finalize PDF module.
FS_RESULT FSCRT_PDFModule_Initialize | ( | ) |
Initialize PDF module.
This is the first function that should be called if the user needs any PDF process.
FS_RESULT FSPDF_ActionData_Clear | ( | FSPDF_ACTIONDATA * | actionData | ) |
Clear PDF action data.
[in] | actionData | Pointer to a FSPDF_ACTIONDATA structure which to be cleared. |
FS_RESULT FSPDF_ActionData_Init | ( | FSPDF_ACTIONDATA * | actionData | ) |
Initialize PDF action data.
[in] | actionData | Pointer to a FSPDF_ACTIONDATA structure which to be set. |
FS_RESULT FSPDF_Attachment_Create | ( | FSCRT_DOCUMENT | document, |
FSPDF_ATTACHMENT * | attachment | ||
) |
Create an attachment object.
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[out] | attachment | Pointer to a FSPDF_ATTACHMENT handle to receive the newly created PDF attachment. If there is any error, it will be NULL |
FS_RESULT FSPDF_Attachment_GetCheckSum | ( | FSPDF_ATTACHMENT | attachment, |
FSCRT_BSTR * | checksum | ||
) |
Get an attachment's checksum.
The checksum refers to checksum of the bytes of an uncompressed embedded file.
The checksum is calculated by applying the standard MD5 message-digest algorithm (described in Internet RFC 1321, the MD5 Message-Digest Algorithm; see the Bibliography) to the bytes of the embedded file stream.
[in] | attachment | Handle to a FSPDF_ATTACHMENT object returned by function FSPDF_Attachments_GetAttachment. |
[out] | checksum | Pointer to a FSCRT_BSTR structure that receives the checksum of the attachment. If there is any error, FSCRT_BSTR::str will be set empty if it is not NULL while calling this function, and FSCRT_BSTR::len will be set 0. |
FS_RESULT FSPDF_Attachment_GetCreationDateTime | ( | FSPDF_ATTACHMENT | attachment, |
FSCRT_DATETIMEZONE * | dt | ||
) |
Get creation date and time of an attachment.
[in] | attachment | Handle to a FSPDF_ATTACHMENT object returned by function FSPDF_Attachments_GetAttachment. |
[out] | dt | Pointer to FSCRT_DATETIMEZONE structure that receives creation date and time. |
FS_RESULT FSPDF_Attachment_GetData | ( | FSPDF_ATTACHMENT | attachment, |
FS_BOOL | isRawData, | ||
FSCRT_FILE * | file | ||
) |
Get the attachment data with an asynchronous way.
This function provides an asynchronous way to get the attachment data. This function is usually used to get a large size of attachment data in a progressive way. When this function returns, the application need to invoke function FSCRT_File_Read by passing the returned FSCRT_FILE to extract the needed data.
[in] | attachment | Handle to a valid FSPDF_ATTACHMENT object which is a PDF attachment object. |
[in] | isRawData | A boolean value indicates to get raw data if it is TRUE, or to get decoded data (original data) if it is FALSE. |
[out] | file | Pointer to a FSCRT_FILE handle that receives the handle of file object. |
FS_RESULT FSPDF_Attachment_GetDescription | ( | FSPDF_ATTACHMENT | attachment, |
FSCRT_BSTR * | description | ||
) |
Get description of an attachment.
Descriptive text associated with the attachment. It is used for files in the EmbeddedFiles name tree.
[in] | attachment | Handle to a FSPDF_ATTACHMENT object returned by function FSPDF_Attachments_GetAttachment. |
[out] | description | Pointer to a FSCRT_BSTR structure that receives the description of attachment. It would be in UTF-8 format. If there is any error, FSCRT_BSTR::str will be set empty if it is not NULL while calling this function, and FSCRT_BSTR::len will be set 0. |
FS_RESULT FSPDF_Attachment_GetDocument | ( | FSPDF_ATTACHMENT | attachment, |
FSCRT_DOCUMENT * | document | ||
) |
Get a document handle related to an attachment.
[in] | attachment | Handle to a FSPDF_ATTACHMENT object which is an attachment object. |
[out] | document | Pointer to a FSCRT_DOCUMENT handle that receives a handle of document object associated with the parameter attachment. |
FS_RESULT FSPDF_Attachment_GetFileName | ( | FSPDF_ATTACHMENT | attachment, |
FSCRT_BSTR * | fileName | ||
) |
Get file name of an attachment.
[in] | attachment | Handle to a FSPDF_ATTACHMENT object returned by function FSPDF_Attachments_GetAttachment. |
[out] | fileName | Pointer to a FSCRT_BSTR structure that receives file name of the attachment. It would be in UTF-8 format. If there is any error, FSCRT_BSTR::str will be set empty if it is not NULL while calling this function, and FSCRT_BSTR::len will be set 0. |
FS_RESULT FSPDF_Attachment_GetModifiedDateTime | ( | FSPDF_ATTACHMENT | attachment, |
FSCRT_DATETIMEZONE * | dt | ||
) |
Get the last modification date and time of an attachment.
[in] | attachment | Handle to a FSPDF_ATTACHMENT object returned by function FSPDF_Attachments_GetAttachment. |
[out] | dt | Pointer to FSCRT_DATETIMEZONE structure that receives the last modification date and time. |
FS_RESULT FSPDF_Attachment_GetSize | ( | FSPDF_ATTACHMENT | attachment, |
FSCRT_FILESIZE * | size | ||
) |
Get the size of an attachment.
The size of an embedded attachment is in bytes.
[in] | attachment | Handle to a FSPDF_ATTACHMENT object returned by function FSPDF_Attachments_GetAttachment. |
[out] | size | Pointer to a FSCRT_FILESIZE object that receives the size of attachment. In order to keep forward compatibilities, use 64-bits here. If there is any error, it will be set 0. |
Check whether an attachment is an embedded file or not.
The PDF attachment can take either of two forms.
[in] | attachment | Handle to a FSPDF_ATTACHMENT object returned by function FSPDF_Attachments_GetAttachment. |
[out] | embedded | Pointer to a FS_BOOL object that receives whether the attachment is an embedded file or not. If there is any error, it will be FALSE. |
FS_RESULT FSPDF_Attachment_Release | ( | FSCRT_DOCUMENT | document, |
FSPDF_ATTACHMENT | attachment | ||
) |
Release a attachment object.
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[in] | attachment | Handle to a FSPDF_ATTACHMENT object which is to be released, but this cannot be returned by function FSPDF_Attachments_GetAttachment. |
FS_RESULT FSPDF_Attachment_SetCheckSum | ( | FSPDF_ATTACHMENT | attachment, |
const FSCRT_BSTR * | checksum | ||
) |
Set the checksum of an attachment.
The checksum refers to checksum of the bytes of the uncompressed embedded file.
The checksum is calculated by applying the standard MD5 message-digest algorithm
(described in Internet RFC 1321, the MD5 Message-Digest Algorithm; see the Bibliography) to the bytes of the embedded file stream.
[in] | attachment | Handle to a valid FSPDF_ATTACHMENT object which is a PDF attachment object. |
[in] | checksum | Pointer to a FSCRT_BSTR structure which specifies the checksum of the attachment. |
FS_RESULT FSPDF_Attachment_SetCreationDateTime | ( | FSPDF_ATTACHMENT | attachment, |
const FSCRT_DATETIMEZONE * | dt | ||
) |
Set the creation date and time of an attachment.
The creation date represents when the attachment was created.
[in] | attachment | Handle to a valid FSPDF_ATTACHMENT object which is a PDF attachment object. |
[in] | dt | Pointer to FSCRT_DATETIMEZONE structure which specifies the creation date. |
FS_RESULT FSPDF_Attachment_SetDescription | ( | FSPDF_ATTACHMENT | attachment, |
const FSCRT_BSTR * | description | ||
) |
Set the description of an attachment.
Descriptive text associated with the attachment. It is used for files in the EmbeddedFiles name tree.
[in] | attachment | Handle to a valid FSPDF_ATTACHMENT object which is a PDF attachment object. |
[in] | description | Pointer to a FSCRT_BSTR structure which specifies the description of the attachment. It should be in UTF-8 format. |
FS_RESULT FSPDF_Attachment_SetFile | ( | FSPDF_ATTACHMENT | attachment, |
FSCRT_FILE | file | ||
) |
Set the file of an attachment.
For attachment created by function FSPDF_Attachment_Create, this function is used to initialize the newly created attachment object before setting other properties of it.
For attachment got from PDF document, this function is used to set new file handle to this attachment.
ATTENTION: for initializing newly created attachment, only need to call one of functions FSPDF_Attachment_SetFileName or FSPDF_Attachment_SetFile.
[in] | attachment | Handle to a valid FSPDF_ATTACHMENT object which is a PDF attachment object. |
[in] | file | Handle to a FSCRT_FILE object which specifies the embedded file. This object cannot be released until attachment has been released for no use or attachment has been inserted to other object and document has been saved. |
FS_RESULT FSPDF_Attachment_SetFileName | ( | FSPDF_ATTACHMENT | attachment, |
const FSCRT_BSTR * | fileName, | ||
FS_BOOL | isURL | ||
) |
Set the file name of an attachment.
For attachment created by function FSPDF_Attachment_Create, this function is used to initialize the newly created attachment object before setting other properties of it.
For attachment got from PDF document, this function is used to set new file name to this attachment.
ATTENTION: for initializing newly created attachment, only need to call one of funcions FSPDF_Attachment_SetFileName or FSPDF_Attachment_SetFile.
[in] | attachment | Handle to a valid FSPDF_ATTACHMENT object which is a PDF attachment object. |
[in] | fileName | Pointer to a FSCRT_BSTR structure which specifies file name of the attachment. It should be in UTF-8 format. |
[in] | isURL | A FS_BOOL that specifies whether the set file is a remote file. |
FS_RESULT FSPDF_Attachment_SetModifiedDateTime | ( | FSPDF_ATTACHMENT | attachment, |
const FSCRT_DATETIMEZONE * | dt | ||
) |
Set the modification date of an attachment.
The modification date represents when the attachment was last modified.
[in] | attachment | Handle to a valid FSPDF_ATTACHMENT object which is a PDF attachment object. |
[in] | dt | Pointer to FSCRT_DATETIMEZONE structure which specifies the modification date. |
FS_RESULT FSPDF_Attachment_WriteToFile | ( | FSPDF_ATTACHMENT | attachment, |
FSCRT_FILE | file | ||
) |
Write the attachment data directly into a file.
[in] | attachment | Handle to a valid FSPDF_ATTACHMENT object which is a PDF attachment object. |
[in] | file | Handle to a FSCRT_FILE object. When this function is called, it indicates the file that the attachment to be saved to. When this function returns, it indicates to save the attachment to a file. |
FS_RESULT FSPDF_Font_GetDict | ( | FSCRT_DOCUMENT | document, |
FSCRT_FONT | font, | ||
FSPDF_OBJECT * | fontDictionary | ||
) |
Get the dictionary of a font in a PDF document.
[in] | font | Handle to a FSCRT_FONT object which should be a PDF font.A PDF font is the font actually used in the PDF document. |
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[out] | fontDictionary | Pointer to a FSPDF_OBJECT object that receives the dictionary of the font. If there is any error, it will be NULL. |
Check whether a font is embedded in a PDF document.
[in] | font | Handle to a FSCRT_FONT object which is a PDF or non-PDF font. |
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[out] | isEmbedded | Pointer to a FS_BOOL object which indicates whether parameter font is embedded in PDF document or not. TRUE means parameter font is embedded in PDF document, otherwise it will be FALSE. |
FS_RESULT FSPDF_Font_IsSupportEmbedded | ( | FSCRT_DOCUMENT | document, |
FSCRT_FONT | font, | ||
FS_BOOL * | isSupported | ||
) |
Check whether all features of the font can be embedded to a specific PDF document or not.
Due to various reasons, it is hard to always ensure the appearance of characters will stay the same after its font is embedded to PDF document. So this function can be used to check whether the font can be fully embedded or not before calling function FSPDF_Doc_EmbedFont.
Specially,
[in] | document | Handle to a FSCRT_DOCUMENT object which is a PDF document object. It should be valid. |
[in] | font | Handle to a FSCRT_FONT object. |
[out] | isSupported | Pointer to a FS_BOOL object that receives the result:
|
FS_RESULT FSPDF_RenderContext_Create | ( | FSPDF_RENDERCONTEXT * | pdfRenderContext | ) |
Create a PDF rendering context.
[out] | pdfRenderContext | Pointer to a FSPDF_RENDERCONTEXT handle that receives a new PDF rendering context object. If there is any error, it will be NULL. |
FS_RESULT FSPDF_RenderContext_Release | ( | FSPDF_RENDERCONTEXT | pdfRenderContext | ) |
Release a PDF rendering context.
[in] | pdfRenderContext | Handle to a FSPDF_RENDERCONTEXT object which is a PDF rendering context object. |
Set flags to a rendering context.
[in] | pdfRenderContext | Handle to a FSPDF_RENDERCONTEXT object which is a PDF rendering context object. |
[in] | flags | Rendering flags value. All undefined bits are omitted. Please refer to macro definitions FSPDF_RENDERCONTEXTFLAG_XXX and this can be one or a combination of these macros. |
FS_RESULT FSPDF_RenderContext_SetHalftoneLimit | ( | FSPDF_RENDERCONTEXT | pdfRenderContext, |
FS_INT32 | halftoneLimit | ||
) |
Set a halftone limit to a rendering context.
By default, Foxit PDF SDK displays all bitmaps using down-sampling, which means if an image is shrink onto the screen, only part of pixels will be picked and displayed. This saves a lot of calculation, especially for big images with millions of pixels. However the display quality will be bad.
In order to reach a balance between performance and quality, application can use this function to set a limit:
if the count of pixels in an image is more than this limit, then Foxit PDF SDK will use down-sampling for quick drawing;
otherwise, if the image has less pixels, Foxit PDF SDK will use halftone for better quality.
[in] | pdfRenderContext | Handle to a FSPDF_RENDERCONTEXT object which is a PDF rendering context object. |
[in] | halftoneLimit | A halftone limit to a FS_INT32 value. |
FS_RESULT FSPDF_RenderContext_SetLayerContext | ( | FSPDF_RENDERCONTEXT | pdfRenderContext, |
FSPDF_LAYERCONTEXT | layerContext | ||
) |
Set layer context to render context handle.
[in] | pdfRenderContext | Handle to a FSPDF_RENDERCONTEXT object which is a PDF rendering context object. |
[in] | layerContext | Handle to a FSPDF_LAYERCONTEXT object which is a PDF layer context object. |
FS_RESULT FSPDF_RenderContext_SetMatrix | ( | FSPDF_RENDERCONTEXT | pdfRenderContext, |
const FSCRT_MATRIX * | matrix | ||
) |
Set a transformation matrix to a rendering context.
[in] | pdfRenderContext | Handle to a FSPDF_RENDERCONTEXT object which is a PDF rendering context object. |
[in] | matrix | Pointer to a FSCRT_MATRIX structure which gives a transformation matrix while rendering PDF contents. |
FS_RESULT FSPDF_RenderContext_SetOption | ( | FSPDF_RENDERCONTEXT | pdfRenderContext, |
FS_DWORD | option, | ||
FS_LPVOID | params | ||
) |
Set option parameters to a rendering context.
[in] | pdfRenderContext | Handle to a FSPDF_RENDERCONTEXT object which is a PDF rendering context object. |
[in] | option | A rendering option identity code to a FS_DWORD value. Please refer to macro definitions FSPDF_RENDEROPTION_XXX and this should be one of these macros. |
[in] | params | Pointer to FS_LPVOID object which indicates rendering parameters for parameter option. |