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.
Name | Type | Default | Description |
InitCMFlags | TPDFInitCMFlags | icmBPCompensation = 1 | Flags for initialization of Color Management |
DestSpace | TPDFColorSpace | csDeviceRGB = 0 | Destination color space for Color Mangement |
PixFmt | TPDFPixFormat | pxfRGB = 2 | The desired pixel format. |
Flags | TRasterFlags | rfDefault = 0 | The raster flags. |
Filter | TCompressionFilter | cfFlate = 0 | The desired compression filter. |
Format | TImageFormat | ifmJPEG = 1 | The desired image format. |
Resolution | Number | The resolution to use for the PDF pages. This calculates width and height automatically. | |
Width | Number | The desired width of the images. | |
Height | Number | The desired height of the images. | |
PageRangeStart | Number | 1 | The first page to start rendering. |
PageRangeLength | Number | -1 | The number of pages to render. Use -1 for all pages. |
PasswordType | TPwdType | ptOpen = 0 | The password type. Either open password (0) or owner password (1). |
JPEGQuality | Number | The JPEG quality to use. If not set, the default setting is 70. Range 0 to 100. | |
Password | String | The password for opening the PDF file. | |
InputPath | String | The native file path for the PDF to read. | |
FinishedScriptName | String | The script to trigger when done. | |
FinishedFileName | String | The filename for the script to trigger when done. | |
outputSQL | String | The 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. | |
outputSQLFileName | String | The file name for the SQL execution. Can be empty. | |
outputPath | String | The output file path to write image files. Should include file name with extension and can use $page as variable for the page number. | |
DefInGray | Base64 String | Gray Colorspace for Color Management | |
DefInRGB | Base64 String | RGB Colorspace for Color Management | |
DefInCMYK | Base64 String | CMYK Colorspace for Color Management | |
DeviceProfile | Base64 String | Device Colorspace for Color Management | |
SoftProof | Base64 String | Soft Proofing Colorspace for Color Management |
Name | Type | Description |
FilesCount | Number | Number of files written. |
SQLErrorsCount | Number | Number of SQL errors (only in synchronous mode) |
ErrorMessage | Text | The error message from DynaPDF. |
ErrorCode | Number | The error code from DynaPDF. |
ErrorType | Number | The error type from DynaPDF. |
PageCount | Number | The number of pages in the input PDF. |
PageRendered | Number | The number of pages rendered. |
InputPath | Text | The PDF input path used. |
Files | Array of Text | The list of files created. |
SQLErrors | Array of Text | The 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
