Name
cx:pdf-decrypt — Remove the encryption from a PDF.
Synopsis
This step removes the password protection from a PDF.
| Input port | Primary | Sequence | Content types |
|---|---|---|---|
| source | ✔ | application/pdf |
| Output port | Primary | Sequence | Content types |
|---|---|---|---|
| result | ✔ |
| Option name | Type | Values | Default value |
|---|---|---|---|
| compression | xs:string | ('none', 'default') | 'default' |
| password | xs: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-decrypt">
| <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 decrypts the PDF and removes any access restrictions on it.
Document properties
No document properties are preserved.
Additional examples
The XML Calabash test suite contains examples of the cx:pdf-decrypt step.