Name

cx:pdf-merge — Combine multiple PDFs.

Synopsis

This step merges two or more PDF files.

Input portPrimarySequenceContent types
source✔  application/pdf 
secondary ✔ application/pdf 
Output portPrimarySequenceContent types
result✔  application/pdf 
Option nameTypeValuesDefault value
compressionxs:string('none', 'default') 'default'
passwordxs:string? ()
This is an extension step; to use it, your pipeline must include its declaration. For example, by including the extension library with an import at the top of your pipeline:
<p:import href="https://xmlcalabash.com/ext/library/pdf-steps.xpl"/>
Declaration
1 |<p:declare-step xmlns:cx="http://xmlcalabash.com/ns/extensions"
  |                xmlns:p="http://www.w3.org/ns/xproc"
  |                type="cx:pdf-merge">
  |   <p:input port="source" primary="true" content-types="application/pdf"/>
5 |   <p:input port="secondary" sequence="true" content-types="application/pdf"/>
  |   <p:output port="result" content-types="application/pdf"/>
  |   <p:option name="password" as="xs:string?"/>
  |   <p:option name="compression" values="('none', 'default')" select="'default'"/>
  |</p:declare-step>

Description

All of the PDF documents on the secondary port are appended to the source PDF, in order.

If the source PDF is encrypted, it will be opened with the specified password. All of the PDF files on the secondary port must already be decrypted.

Document properties

No document properties are preserved.

Additional examples

The XML Calabash test suite contains examples of the cx:pdf-merge step.