ConcatPDF

ConcatPDF concatenates two PDF documents.

Syntax

ConcatPDF 
   File1(<text>) 
   File2(<text>) 
   Dest(<text>)
   ProducePDFA(<True or False>)
   Processor(“Amyuni” or “PDFLib”);

Parameters

  • File1: Required. The full path of the first PDF document.
  • File2: Required. The full path of the second PDF document. This document is concatenated to the File1 PDF document.
  • Dest: Required. The full path of the resulting PDF document that contains the concatenated pages. If the source PDF file contains attachments, they are removed from the result PDF file.

    This path must differ from the ones you specify in File1 or File2.

  • ProducePDFA: Optional (Default setting: False). This parameter determines whether the resulting document is PDF/A-1b compliant.

  • Processor: Optional. Selects the conversion technology used to concatenate the PDF files. If this parameter is set to "Amyuni", the Amyuni toolkit is used. If this parameter is set to "PDFLib", the PDFLib toolkit is used. Default is "PDFLib". You can change the default through the following setting in the dp.ini file:

    PDFTools.Processor=<"Amyuni" or "PDFLib">

    The command can only produce PDF/A-1b compliant documents if both input documents are PDF/A-1b compliant and if the parameter ProducePDFA is set to True.
  • InteractiveFeatures: Optional. Takes effect only when Processor is set to "PDFLib". This parameter controls how the ConcatPDF command processes the following interactive PDF features of the input PDF documents:
    • Bookmarks: A PDF file can contain a bookmark structure that follows the document outline. This outline includes entries that link to the corresponding page when clicked.
    • Links: A PDF file can contain links to a particular page within the document or to an external URL.

    InteractiveFeatures parameter does not maintain bookmarks and links that have named destinations.

    This parameter can have three values:

    1. IncludeStrict: Supported interactive features of the input documents are included in the result document. Any issues related to these features are flagged as errors, and processing is stopped. IncludeStrict does not guarantee that the supported interactive features are included in the result document in exactly the same way as they were present in the input documents. However, it attempts to detect and flag issues. When bookmarks or links with named destinations are encountered an error appears.
    2. Include: Supported interactive features of the input documents are included in the result document. The interactive features are replicated as closely to the originals as possible, but any deviations are not flagged as an error. Bookmarks and links with named destinations are not included in the result document.
    3. Exclude: No interactive features of the input document are included in the result document. This option can speed up processing of documents that support a large number of interactive features. Does not include any bookmarks or links, therefore non of them is flagged as an error.

    If the InteractiveFeatures parameter is omitted, you can configure the default behavior of the ConcatPDF command in the dp.ini file. Do this by assigning one of the preceding InteractiveFeatures values to the following setting:

    PDFTools.InteractiveFeatures

    If not specified, the default is include.

Also, when selecting the conversion technology, note the following:

  • Amyuni
    • ConcatPDF is only supported if both input documents are produced using DocToPDF with the Processor value set to "Word".
    • ConcatPDF fails if File1 and File2 refer to the same file.
  • PDFLib
    • ConcatPDF can be used to concatenate more than two documents. To concatenate a list of documents, pass the first document as the File1 parameter. Pass the other documents to the File2 parameter as a comma-separated list. Prepend this list with an extra comma to identify the value as a list.
    • ConcatPDF cannot transfer interactive elements and document structure information from the source documents.
    • As of KCM Core version 5.1.1, hyperlinks and bookmarks are transferred to the result.
When a PDF document is concatenated to a secured PDF document, the following result is obtained, depending on the selected conversion technology:
  • For Amyuni, the resulting PDF document has the same security settings as the PDF document specified in the File1 parameter.
  • For PDFLib, the resulting PDF document has no security set.