Export Image Module




Detailed Description

group a3d_pdf_exportimage_module

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

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.



  • pDoc[in] The Document object to work with.

  • iNumPage[in] The 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.

  • dScale[in] Scale 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.

  • eFormatOut[in] Format of the output image.

  • pcOutImgFileName[in] The file name where to save the document. The path (absolute or relative) must be provided (use “.\” or “./” for the current directory).

  • piNbPages[out] The number of pages in the document. It is useful if -1 is provided to iNumPage to process all generated pages.

Return values:



A3D_SUCCESS in case of success or an error code