Module to export a PDF document to image formats. More...

Functions

A3DStatus A3DPDFDocumentExportAsImage (A3DPDFDocument *pDoc, const A3DInt32 iNumPage, const A3DDouble dScale, const A3DPDFEImageFormat eFormatOut, const A3DUTF8Char *pcOutImgFileName, A3DInt32 *piNbPages)
 Export a PDF document to image, treating only one page or all pages. More...
 

Detailed Description

Module to export a PDF document to image formats.

This module describes the functions and structures that allow you to export a PDF document to image formats.

Function Documentation

◆ A3DPDFDocumentExportAsImage()

A3DStatus A3DPDFDocumentExportAsImage ( A3DPDFDocument pDoc,
const A3DInt32  iNumPage,
const A3DDouble  dScale,
const A3DPDFEImageFormat  eFormatOut,
const A3DUTF8Char pcOutImgFileName,
A3DInt32 piNbPages 
)

Export a PDF document to image, treating only one page or all pages.

This version is in beta mode and only supported on windows platform.

Parameters
[in]pDocThe Document object to work with.
[in]iNumPageThe index of the page. The first page is 0. A value of -1 is to convert all pages of the document. If iNumPage is specified (not -1), then one image file is generated with the exact name provided in pcOutImgFileName. If iNumPage is -1, then iNbPages image files are generated with names "pcOutImgFileName_i.extension", with 'i' = 0 to iNbPages-1 and 'extension' being the trigram corresponding to the image format ('bmp', 'jpg', 'png', ...). Note that some file images could not exist in case of error. Please always check the existence of the file image before processing it.
[in]dScaleScale to be applied to the image. The image generated is of the size of the PDF page (for ex. 612*792 pixels for a 612*792 points page). the scale here is applied to the size of the image.
[in]eFormatOutFormat of the output image.
[in]pcOutImgFileNameThe file name where to save the document. The path (absolute or relative) must be provided (use ".\\" or "./" for the current directory).
[out]piNbPagesThe number of pages in the document. It is useful if -1 is provided to iNumPage to process all generated pages.
Returns
A3D_SUCCESS in case of success or an error code
Return values
A3D_SUCCESS
Version
12.0