Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  

DynaPDF.RenderPDFFile

Renders whole PDF file in current PDF to an image.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 5.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.RenderPDFFile"; PDF; DestPath; Resolution; Flags; PixelFormat; Filter; Format )   More

Parameters

Parameter Description Example
PDF The PDF reference returned from DynaPDF.New. $pdf
DestPath A file path for storing images. Can be folder for multiple images files or file for one file. If a folder, it must exist. "/Users/cs/Desktop/test.jpg"
Resolution The resolution you'd like to have for the image. If you pass zero, we use default resolution (72). 150
Flags Flags for rendering. Use 0 for the default flags. For other values, please look into dynapdf manual.
With version 6.4 of our plugin, you can also specify this by passing in text string, e.g. "Rotate90¶ClipToTrimBox"
0
PixelFormat The pixel format. Can be 1bit, gray, RGB, BGR, RGBA, BGRA, ARGB, ABGR, CMYK, CMYKA and GrayA. Default is RGB. "RGB"
Filter The compression filter to use. Can be Flate, JPEG, CCITT3, CCITT4, LZW or JP2K. Default is JPEG. "JPEG"
Format The image format to use. Can be TIFF, JPEG, PNG, BMP or JPC. Default is JPEG. "JPEG"

Result

Returns OK or error.

Description

Renders whole PDF file in current PDF to an image.
You can choose the format and filter, but please make sure they match as not all combinations are valid.
This can write multipage tiff files or a folder of image files.

Requires DynaPDF Pro license for the raster engine to create bitmaps from PDF pages.
Please use DynaPDF.InitColorManagement or DynaPDF.InitColorManagementEx to initialize color management, so conversions to other colorspaces like CMYK work better.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.

Examples

Render PDF to desktop with several JPEG pages:

$result = MBS( "DynaPDF.RenderPDFFile"; $PDF; "/Users/cs/Desktop"; 150; 0; "RGB"; "JPEG"; "JPEG" )

Render TIFF with higher resolution:

$result = MBS( "DynaPDF.RenderPDFFile"; $PDF; "c:\test.tif"; 150; 0; "RGB"; "Flate"; "TIFF" )

See also

Release notes

Blog Entries

Created 12nd December 2014, last changed 26th May 2021


DynaPDF.RenameSpotColor - DynaPDF.RenderPDFFileEx

Feedback: Report problem or ask question.