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:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
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 |
Parameter | Description | Example | Flags |
---|---|---|---|
The PDF reference returned from DynaPDF.New. | |||
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" | Optional |
Resolution | The resolution you'd like to have for the image. If you pass zero, we use default resolution (72). | 150 | Optional |
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 | Optional |
PixelFormat | The pixel format. Can be 1bit, gray, RGB, BGR, RGBA, BGRA, ARGB, ABGR, CMYK, CMYKA and GrayA. Default is RGB. | "RGB" | Optional |
Filter | The compression filter to use. Can be Flate, JPEG, CCITT3, CCITT4, LZW or JP2K. Default is JPEG. | "JPEG" | Optional |
Format | The image format to use. Can be TIFF, JPEG, PNG, BMP or JPC. Default is JPEG. | "JPEG" | Optional |
Returns OK or error.
See also RenderPDFFile function in DynaPDF manual.
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" )
Open PDF and render page as image to container:
# Start new PDF workspace
Set Variable [$pdf; Value:MBS("DynaPDF.New")]
# Load PDF from container
Set Variable [$r; Value: MBS("DynaPDF.OpenPDFFromContainer"; $pdf; Test::data)]
# Import all pages
Set Variable [$r; Value: MBS("DynaPDF.ImportPDFFile"; $pdf)]
# Render one page as Picture
Set Variable [$r; Value: MBS( "DynaPDF.RenderPDFFile"; $PDF; "c:\test.tif"; 150; 0; "RGB"; "Flate"; "TIFF" ) )]
# Put in Container
Set Field [Test::PageImage; $r]
# cleanup
Set Variable [$r; Value:MBS("DynaPDF.Release"; $pdf)]
This function checks for a license.
Created 12nd December 2014, last changed 17th July 2022