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.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  


Creates a new PDF file with all the given PDF files/references.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
PDFKit 2.3 Yes No Yes, macOS only No No

MBS( "PDFKit.Combine"; Name; PDFs )


Parameter Description Example value
Name A text with the file name to include with the PDF. "test.pdf"
PDFs Several PDF references. A container value with the PDF content from a media field. Or a text with an URL. Or a PDF reference from PDFKit.Open. The function will fail if one of those is an image file.


Returns the PDF container value.


Creates a new PDF file with all the given PDF files/references.
You can pass container values, URLs or PDF references. You can pass one PDF reference to save to a new PDF.
Please note the difference between PDFKit.Combine and PDFKit.CombineRef. Combine returns a new container value with the new PDF. CombineRef returns the new PDF reference for further processing.
If on combining one of the PDF parameters is not a valid PDF, the function returns an error. You can use PDFKit.SetIgnoreCombineErrors to disable that and ignore all PDFs which fail to open. For example if you write code which takes 4 container values and not all of them contain PDF files.

Starting with version 6.0, the PDFs parameters can also be lists of paths or reference numbers.


Combine two PDF files form two media fields into a new PDF

MBS("PDFKit.Combine"; "test.pdf"; mytable::test1; mytable::test2)

Merge PDFs:

#Start with blank list
Set Variable [$list; Value:""]
#Load PDF from container
Go to Record/Request/Page [First]
Set Variable [$destPage; Value:1]
    Set Variable [$r; Value:MBS("PDFKit.OpenContainer"; Merge PDFs::InputPDF)]
    If [MBS("IsError") = 0]
Set Variable [$list; Value:$list & $r & ¶]
    End If
    Go to Record/Request/Page [Next; Exit after last]
End Loop
Set Field [Merge PDFs::FinalPDF; MBS("PDFKit.Combine"; "merge.pdf"; $list)]
Set Variable [$r; Value:MBS("PDFKit.Release"; $list)]

See also

Example Databases

PDFKit.AppendPages   -   PDFKit.CombineRef

Feedback: Report problem or ask question.

MBS Xojo Plugins