BE_PDFAppend ( pdfPathOrContainer ; appendPathOrContainer ; { destinationPath } )

Joins two pdf files together, either by appending one to the first, or by creating a third PDF that is the end result.


  • pdfPathOrContainer : the first PDF file to be appended TO.  Can be a container field or a path to a file
  • appendPathOrContainer : the second file, to be added to the first file.  Can be a container field or a path to a file
  • destinationPath : the path to the result file.  If left out, then use this in a Set Field step that points to a container file.

Version History:

  • 4.0 :
  • 4.0.2 : Renamed from BE_PDF_Append

Code Examples:

Set Field [ table::containerField ; BE_PDFAppend ( table::pdfField1 ; table::pdfField2 ) ]

Sets  a container field using two other fields.

Set Field [ table::containerField ; BE_PDFAppend ( "/pluginPath/to/file1.pdf" ; "/pluginPath/to/file2.pdf" ) ]

Sets  a container field using two paths.

Set Variable [ $result ; BE_PDFAppend ( table::pdfField1 ; "/pluginPath/to/file2.pdf" ; "/pluginPath/to/outputFile.pdf" ) ]

Creates an external PDF file by combining a container field and a different external file.

Notes :

Some PDFs although they render properly in a PDF Viewer are incompatible with the PDF standard or at least with the version of the standard that our library supports. When this is the case you can get an error when trying to append the PDF.

To diagnose this before appending if you do BE_PDFPageCount ( table::field ) on the PDF you get 0 back from the plugin. In other words our library doesn't think there's any content, so it can't be appended.

You should be adding this check in to your script prior to doing any append, to confirm that both files contain data.

In terms of fixing the PDF, there's no way to do that inside the plugin at the moment.

You may be able to do this via an external library such Ghostscript. This option requires Ghostscript to be installed on your server or client, and then you run the command using BE_ExecuteSystemCommand.

There are other APIs that offer to do PDF repair :, which can be called with the BE HTTP functions. However the extent to which they can repair a broken PDF vs a non standard PDF is not known. There may also be other similar services online, or local applications as alternatives.

Still need help? Contact Us Contact Us