Name

cx:pdf-copy — Creates a copy of the PDF.

Synopsis

This step creates a copy of the PDF.

Input portPrimarySequenceContent types
source✔  application/pdf 
Output portPrimarySequenceContent types
result✔   
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-copy">
  |   <p:input port="source" content-types="application/pdf"/>
5 |   <p:output port="result"/>
  |   <p:option name="password" as="xs:string?"/>
  |   <p:option name="compression" values="('none', 'default')" select="'default'"/>
  |</p:declare-step>

Description

This step creates a copy of the PDF. If the source PDF is encrypted, this step decrypts the PDF and removes any access restrictions on it.

The only purpose, really, of this step is to change the compression used.

Document properties

No document properties are preserved.

Additional examples

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