Comprehensive Guide for Developers: Features, Integration, and API Reference
Rendering API. More...
Go to the source code of this file.
Classes | |
struct | PDFRenderMonitor |
The render monitor structure. More... | |
struct | PDFRenderCommonParams |
Contains rendering parameters. More... | |
struct | PDFRenderViewParams |
Contains view-specific parameters, such as zoom level, orientation and annotation settings. More... | |
Typedefs | |
typedef PDErrCode(PDFSDK_CALLCONV * | PDFRenderCancelProc) (void *clientData, bool *pCancelled) |
A user-defined callback function used in the event of a cancellation in the rendering. | |
typedef PDErrCode(PDFSDK_CALLCONV * | PDFRenderUpdateProc) (void *clientData) |
A user-defined callback function used in the event of an update in the rendering. | |
typedef uint32_t | PDFRenderFlags |
typedef struct PDFRenderContextRec_ * | PDFRenderContext |
Enumerations | |
enum | { kPDFRenderPrint = 1 << 0 , kPDFRenderNoContent = 1 << 1 , kPDFRenderNoAnnots = 1 << 2 , kPDFRenderNoMarkupAnnots = 1 << 3 } |
Defines the settings or options that control how the content of a PDF is rendered or displayed. More... | |
Functions | |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDFCreateRenderContext (PDFRenderContext *pcontext) |
Initializes a new render context for rendering PDF content. | |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDFRenderContextPurgeCaches (PDFRenderContext context) |
Releases a render context for rendering PDF content. | |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDFDrawPage (PDPage page, GXRenderTarget target, const PDFRenderCommonParams *commonParams, const PDFRenderViewParams *viewParams) |
Renders a PDF page to a specified render target. | |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDFDrawFormXObject (PDEXObject xobject, GXRenderTarget target, const PDFRenderCommonParams *params, const PDMatrix *pageMatrix) |
Paints a Form XObject and renders it to a specified render target. | |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDFDrawContent (PDEContent content, GXRenderTarget target, const PDFRenderCommonParams *params, const PDMatrix *pageMatrix) |
Renders PDF content to a specified render target. | |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDFDrawAnnot (PDAnnot annot, PDAnnotState state, GXRenderTarget target, const PDFRenderCommonParams *commonParams, const PDFRenderViewParams *viewParams, PDRotate pageRotate, const PDMatrix *pageMatrix) |
Renders a single annotation on a PDF page to the specified render target. | |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDFPathToGeometry (PDEElement path, GXGeometry *pgeom) |
Converts a PDF path element into a geometric representation. | |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDFPathToPaintGeometry (PDEElement path, GXGeometry *pgeom) |
Converts a PDF path element into a geometric representation suitable for painting operations. | |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDFTextToGeometry (PDEElement text, GXGeometry *pgeom) |
Converts a PDF text element into a geometric representation. | |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDFInlineImageToBitmap (PDEElement image, PDFRenderContext cache, GXBitmap *pbitmap) |
Converts an inline image within a PDF document into a bitmap image. | |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDFXObjectImageToBitmap (PDEXObject xobject, PDERenderingIntent intent, PDFRenderContext cache, GXBitmap *pbitmap) |
Converts an XObject image within a PDF document into a bitmap image. | |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDFBitmapToXObjectImage (PDDoc doc, GXBitmap bitmap, PDAtom compression, PDEXObject *pxobject) |
Converts a bitmap within a PDF document into a XObject image. | |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDFCreateFontFromFontFace (PDDoc doc, GXFontFace fontface, PDEFont *pfont) |
Creates a new PDF font object from a font face. | |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV | PDFFontGetRenderFontFace (PDEFont font, GXFontFace *pFontface) |
Retrieves the font face object used for rendering from a PDF font object. | |
Rendering API.
typedef PDErrCode(PDFSDK_CALLCONV * PDFRenderCancelProc) (void *clientData, bool *pCancelled) |
A user-defined callback function used in the event of a cancellation in the rendering.
typedef PDErrCode(PDFSDK_CALLCONV * PDFRenderUpdateProc) (void *clientData) |
A user-defined callback function used in the event of an update in the rendering.
anonymous enum |
Defines the settings or options that control how the content of a PDF is rendered or displayed.
This enumeration specifies the appearance and behavior of the PDF when it is viewed or printed.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFBitmapToXObjectImage | ( | PDDoc | doc, |
GXBitmap | bitmap, | ||
PDAtom | compression, | ||
PDEXObject * | pxobject ) |
Converts a bitmap within a PDF document into a XObject image.
[in] | doc | The PDF document into which the XObject image will be embedded. |
[in] | bitmap | The bitmap image to be converted into a PDF XObject image. |
[in] | compression | Specifies the compression method to be used on the bitmap image. |
[out] | pxobject | A pointer to the newly created XObject image object. |
For more information refer to section 8.10 Form XObjects from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFCreateFontFromFontFace | ( | PDDoc | doc, |
GXFontFace | fontface, | ||
PDEFont * | pfont ) |
Creates a new PDF font object from a font face.
[in] | doc | The PDF document into which the font object will be embedded. |
[in] | fontface | The font face object from which the font object will be created. |
[out] | pfont | A pointer to the newly created PDF font object. |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFCreateRenderContext | ( | PDFRenderContext * | pcontext | ) |
Initializes a new render context for rendering PDF content.
This function initializes a new render context for rendering operations, environment and settings used to convert the content of a PDF document into a displayable format, such as images or text that can be viewed on a screen. The context will store necessary information such as graphical state and transformations.
[out] | pcontext | A pointer to a PDFRenderContext structure that will be initialized. Ensure that the structure is allocated before calling this function. |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFDrawAnnot | ( | PDAnnot | annot, |
PDAnnotState | state, | ||
GXRenderTarget | target, | ||
const PDFRenderCommonParams * | commonParams, | ||
const PDFRenderViewParams * | viewParams, | ||
PDRotate | pageRotate, | ||
const PDMatrix * | pageMatrix ) |
Renders a single annotation on a PDF page to the specified render target.
This function renders annotations within a PDF document, providing visual feedback and interactivity to users.
[in] | annot | The annotation object to be rendered. |
[in] | state | Defines the visual appearance of an annotation - normal, hovered over, clicked on. |
[in] | target | Where the content will be rendered. This could be a bitmap, a display, or any other medium. |
[in] | commonParams | A pointer to a structure containing common rendering parameters. |
[in] | viewParams | A pointer to a structure containing view-specific parameters, such as zoom level, orientation and annotation settings. |
[in] | pageRotate | The rotation angle of the page (0, 90, 180, 270 Deg). |
[in] | pageMatrix | A pointer to the current transformation matrix which controls the position, size and orientation of the annotation in user space. |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFDrawContent | ( | PDEContent | content, |
GXRenderTarget | target, | ||
const PDFRenderCommonParams * | params, | ||
const PDMatrix * | pageMatrix ) |
Renders PDF content to a specified render target.
This function is essential for displaying or processing visual content.
[in] | content | The object representing the content of the PDF to be rendered. This includes text, images, graphics and other elements. |
[in] | target | Where the content will be rendered. This could be a bitmap, a display, or any other medium. |
[in] | params | A pointer to a structure containing common rendering parameters. |
[in] | pageMatrix | A pointer to he current transformation matrix which controls the position, size and orientation of the content in user space. |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFDrawFormXObject | ( | PDEXObject | xobject, |
GXRenderTarget | target, | ||
const PDFRenderCommonParams * | params, | ||
const PDMatrix * | pageMatrix ) |
Paints a Form XObject and renders it to a specified render target.
This function draws a reusable graphic or image.
For more information refer to section 8.10 Form XObjects from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
[in] | xobject | The object representing the Form XObject. |
[in] | target | Where the page will be rendered. This could be a bitmap, a display, or any other medium. |
[in] | params | A pointer to a structure containing common rendering parameters. |
[in] | pageMatrix | A pointer to the current transformation matrix which controls the position, size and orientation of the form XObject in user space. |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFDrawPage | ( | PDPage | page, |
GXRenderTarget | target, | ||
const PDFRenderCommonParams * | commonParams, | ||
const PDFRenderViewParams * | viewParams ) |
Renders a PDF page to a specified render target.
This function renders PDF content to an output device or medium.
[in] | page | The object representing the PDF page to be rendered. |
[in] | target | Where the page will be rendered. This could be a bitmap, a display, or any other medium. |
[in] | commonParams | A pointer to a structure containing common rendering parameters. |
[in] | viewParams | A pointer to a structure containing view-specific parameters, such as zoom level, orientation and annotation settings. |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFFontGetRenderFontFace | ( | PDEFont | font, |
GXFontFace * | pFontface ) |
Retrieves the font face object used for rendering from a PDF font object.
[in] | font | The PDF font object from which the font face object will be retrieved. |
[out] | pFontface | A pointer to the font face object. |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFInlineImageToBitmap | ( | PDEElement | image, |
PDFRenderContext | cache, | ||
GXBitmap * | pbitmap ) |
Converts an inline image within a PDF document into a bitmap image.
This function is used for rendering or extracting the image data for further processing, because the inline format gives the PDF processor less flexibility in managing the image data.
[in] | image | The inline image element within the PDF document to be converted. |
[in] | cache | The rendering context used for caching and rendering operations. This context helps manage resources and optimize rendering performance. |
[out] | pbitmap | A pointer to a structure where the converted bitmap image will be stored. |
For more information refer to section 8.9.7 Inline images from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFPathToGeometry | ( | PDEElement | path, |
GXGeometry * | pgeom ) |
Converts a PDF path element into a geometric representation.
[in] | path | The element that includes the path data, such as lines, curves, and shapes within the PDF document. |
[out] | pgeom | A pointer to the structure where the geometric representation of the path will be stored. |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFPathToPaintGeometry | ( | PDEElement | path, |
GXGeometry * | pgeom ) |
Converts a PDF path element into a geometric representation suitable for painting operations.
[in] | path | The element that includes the path data, such as lines, curves, and shapes within the PDF document. |
[out] | pgeom | A pointer to the structure where the geometric representation of the path to be painted will be stored. |
For more information refer to section 8.5.3 Path-painting operators from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFRenderContextPurgeCaches | ( | PDFRenderContext | context | ) |
Releases a render context for rendering PDF content.
This function cleans the context cache.
[in] | context | The context of type PDFRenderContext that will be destroyed. |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFTextToGeometry | ( | PDEElement | text, |
GXGeometry * | pgeom ) |
Converts a PDF text element into a geometric representation.
[in] | text | The text element to be converted. It includes its position, font, size, and other attributes. |
[out] | pgeom | A pointer to the structure where the geometric representation of the text will be stored. |
PDF_CORE_API PDErrCode PDFSDK_CALLCONV PDFXObjectImageToBitmap | ( | PDEXObject | xobject, |
PDERenderingIntent | intent, | ||
PDFRenderContext | cache, | ||
GXBitmap * | pbitmap ) |
Converts an XObject image within a PDF document into a bitmap image.
[in] | xobject | The XObject image element within the PDF document to be converted. |
[in] | intent | The rendering intent used for the conversion process. This can affect how the image is processed and rendered in terms of color representation. |
[in] | cache | The rendering context used for caching and rendering operations. This context helps manage resources and optimize rendering performance. |
[out] | pbitmap | A pointer to a structure where the converted bitmap image will be stored. |
For more information refer to sections 8.9.5 Image dictionaries and 8.10 Form XObjects from the ISO 32000-2:2020 (PDF 2.0) PDF Standard.