Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 4.0   4.1   4.2   4.3   4.4   5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0    Statistic  


Renders a page in current PDF to an image.

Component: DynaPDF
Version: 3.0
Mac OS X: Yes
Windows: Yes
Server: Yes
FileMaker Cloud: Yes

MBS( "DynaPDF.RenderPage"; PDF; PageIndex; Resolution; Width; Height; Flags; PixelFormat; Filter; Format { ; Filename; DestPath } )


Parameter Description Example value
PDF The PDF reference returned from DynaPDF.New. $pdf
PageIndex The page number between 1 and DynaPDF.GetPageCount. 1
Resolution The resolution you'd like to have for the image. If you pass zero, we use default resolution (72). 150
Width The width of the output image. Can be zero to use page width or to scale based on height. 800
Height The height of the output image. Can be zero to use page height or to scale based on width. 600
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"
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"
Filename Optional
The file name to use for the container value. Default is page with right file extensions for image. Pass any value if you use DestPath parameter.
DestPath Optional
Optional, a file path for storing image instead of a container.


Returns container value with image or error message.


Renders a page 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.

Requires DynaPDF Pro license.


Render page 5 with default options:

$ImageData = MBS( "DynaPDF.RenderPage"; $PDF; 5 )

Render page 5 with higher resolution:

$ImageData = MBS( "DynaPDF.RenderPage"; $PDF; 5; 150 )

Render page 5 to file:

$result = MBS( "DynaPDF.RenderPage"; $PDF; 5; 150; 0; 0; 0; "RGB"; "JPEG"; "JPEG"; ""; "/Users/cs/Desktop/test.jpg" )

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.RenderPage"; $pdf; Test::PageIndex)]
# Put in Container
Set Field [Test::PageImage; $r]
# cleanup
Set Variable [$r; Value:MBS("DynaPDF.Release"; $pdf)]

See also

DynaPDF.RenderPDFFile   -   DynaPDF.ReplacePattern

Feedback: Report problem or ask question.

MBS Realbasic PDF Plugins - Nachhilfe Nickenich