Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

DynaPDF.RenderJob

Renders PDF pages in the background.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 15.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.RenderJob"; Job { ; InputContainer; Sync } )   More

Parameters

Parameter Description Example Flags
Job The job data as JSON. $json
InputContainer Input PDF as a container.
Alternatively pass InputPath in the job JSON.
RenderJob::PDF Optional
Sync Pass 1 to run the job synchronously.
Server side always runs synchronously.
But client runs by default asynchronously.
0 Optional

Result

Returns OK, JSON or error.

Description

Renders PDF pages in the background.
This allows you to specify a JSON with the job and run it in background in FileMaker Pro or synchronously in FileMaker Server. For synchronous mode, we return a JSON and otherwise pass it to the script triggered as parameter.

Input parameters are show in the first table and result/script parameter JSON is shown in the second table.

NameTypeDefaultDescription
InitCMFlagsTPDFInitCMFlagsicmBPCompensation = 1Flags for initialization of Color Management
DestSpaceTPDFColorSpacecsDeviceRGB = 0Destination color space for Color Mangement
PixFmtTPDFPixFormatpxfRGB = 2The desired pixel format.
FlagsTRasterFlagsrfDefault = 0The raster flags.
FilterTCompressionFiltercfFlate = 0The desired compression filter.
FormatTImageFormatifmJPEG = 1The desired image format.
ResolutionNumberThe resolution to use for the PDF pages. This calculates width and height automatically.
WidthNumberThe desired width of the images.
HeightNumberThe desired height of the images.
PageRangeStartNumber1The first page to start rendering.
PageRangeLengthNumber-1The number of pages to render. Use -1 for all pages.
PasswordTypeTPwdTypeptOpen = 0The password type. Either open password (0) or owner password (1).
JPEGQualityNumberThe JPEG quality to use. If not set, the default setting is 70. Range 0 to 100.
PasswordStringThe password for opening the PDF file.
InputPathStringThe native file path for the PDF to read.
FinishedScriptNameStringThe script to trigger when done.
FinishedFileNameStringThe filename for the script to trigger when done.
outputSQLStringThe SQL to run for saving images to the database. Can be INSERT or UPDATE statement and use $page as variable for the page number or $container for the image itself.
outputSQLFileNameStringThe file name for the SQL execution. Can be empty.
outputPathStringThe output file path to write image files. Should include file name with extension and can use $page as variable for the page number.
DefInGrayBase64 StringGray Colorspace for Color Management
DefInRGBBase64 StringRGB Colorspace for Color Management
DefInCMYKBase64 StringCMYK Colorspace for Color Management
DeviceProfileBase64 StringDevice Colorspace for Color Management
SoftProofBase64 StringSoft Proofing Colorspace for Color Management

NameTypeDescription
FilesCountNumberNumber of files written.
SQLErrorsCountNumberNumber of SQL errors (only in synchronous mode)
ErrorMessageTextThe error message from DynaPDF.
ErrorCodeNumberThe error code from DynaPDF.
ErrorTypeNumberThe error type from DynaPDF.
PageCountNumberThe number of pages in the input PDF.
PageRenderedNumberThe number of pages rendered.
InputPathTextThe PDF input path used.
FilesArray of TextThe list of files created.
SQLErrorsArray of TextThe list of SQL errors.

e.g. the output path would be "/tmp/test/Page$page.jpg" to and output SQL could be "INSERT INTO RenderJob (Page, Image) VALUES ($page, $container)" to insert the images to a table.

For running the scripts the current script needs to finish. And for SQL to run and insert or update records, you need to have a script pause or a time where no script runs.

See also

Release notes

  • Version 15.2
    • Added DynaPDF.RenderJob function.

Blog Entries

This function checks for a license.

Created 16th March 2025, last changed 28th March 2025


DynaPDF.RenameSpotColor - DynaPDF.RenderPDFFile