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.0   12.1   12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3    Statistic    FMM    Blog  


Loads a PDF document from file synchronously.

Component Version macOS Windows Linux Server iOS SDK
WinPDF 13.2 ❌ No ✅ Yes ❌ No ✅ Yes, on Windows ❌ No
MBS( "WinPDF.LoadFile"; Path { ; Password } )   More


Parameter Description Example Flags
Path Native file path to the PDF file. "C:\test\test.pdf"
Password The password to open the Portable Document Format (PDF) document, if it requires one. Optional


Returns reference number or error.


Loads a PDF document from file synchronously.
Requires Windows 10 or newer.

If the Portable Document Format (PDF) document does not require a password, this method ignores it.
This method reports an ERROR_WRONG_PASSWORD (1323) error if the wrong password is specified.

This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.


Load a PDF from disk:

Set Variable [ $pdf ; Value: MBS( "WinPDF.LoadFile"; "C:\test\test.pdf" ) ]
If [ MBS("IsError") ]
    Show Custom Dialog [ "Failed to open PDF." ; $pdf ]
    Exit Script [ Text Result: ]
End If

See also

Blog Entries

This function checks for a paid license.

Created 8th March 2023, last changed 7th May 2023

WinPDF.LoadContainer - WinPDF.PageBox

💬 Ask a question or report a problem

Start Chat