Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  


Adds a preview picture to a PDF container.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
DynaPDF 4.0 Yes Yes Yes Yes Yes

MBS( "DynaPDF.GeneratePreview"; PDFContainer { ; OnlyImage; ImageName } )


Parameter Description Example value
PDFContainer The input PDF container value. Must contain a PDF file. MyTable::PDFContainer
OnlyImage Optional
Default is 0. But if you pass 1, the plugin does not return the PDF data in the result, but only the preview.
ImageName Optional
If OnlyImage is 1, you can specify a file name for the image result.


Returns updated container value or error.


Adds a preview picture to a PDF container.
On Windows if you have a PDF in a container FileMaker will not show a preview due to a missing PDF rendering library. On Mac OS X the system can show PDF directly and FileMaker uses this.
This function renders first page as JPEG and add it to the container value as preview.
You need to use DynaPDF.Initialize before to load the DynaPDF library and set the license key (Pro required).
With version 5.0 optionally only creates image without passing PDF data back.

Requires DynaPDF Pro license. See also DynaPDF.RenderPage for more options on rendering.

On Mac the PDFKit.GeneratePreview function can be an alternative way, but limited to the capabilities of Apple’s frameworks.


Add a preview to PDF container

# does container have jpeg preview?
If [MBS( "Container.GetTypeSize" ; test::pdf; "JPEG") <= 0]
    # Add preview to PDF in container
    Set Field [test::pdf; MBS("DynaPDF.GeneratePreview"; test::pdf)]
End If

See also

Example Databases

DynaPDF.FreeTextAnnot   -   DynaPDF.GetAnnotCount

Feedback: Report problem or ask question.

MBS FileMaker tutorial videos