# ProcessPDF

## Description

Begins a processing of a Flipbook.

## Limitations

Supports pre-base64 encoded PDF sizes of up to 192MB. Selecting a PDF that exceeds this limitation will result in the failure of the request to process the PDF.

## Parameters

| Name       | Value                                                    |
| ---------- | -------------------------------------------------------- |
| paperID    | The ID of the Paper to process                           |
| xmlOptions | Extra XML options for the processing request (See below) |
| base64Pdf  | The PDF file encoded as a base64 string                  |

### xmlOptions

<table><thead><tr><th>Name</th><th>Required</th><th width="117">Datatype</th><th width="134">Default value</th><th>Description</th></tr></thead><tbody><tr><td>preserve-index</td><td>No</td><td>bool</td><td>true</td><td>Whether to preserve the current index of the Flipbook</td></tr><tr><td>pages-from</td><td>When ‘all-pages’ = false</td><td>int</td><td>1</td><td>The starting page in the catalog processing should begin from</td></tr><tr><td>pages-to</td><td>When ‘all-pages’ = false</td><td>int</td><td>[last page of pdf]</td><td>The ending page in the catalog processing should end with</td></tr><tr><td>all-pages</td><td>No</td><td>bool</td><td>true</td><td>If true, pages-from and pages-to will be ignored, all pages will be processed. If false, pages-from and pages-to must be set</td></tr><tr><td>preserve-links</td><td>No</td><td>bool</td><td>true</td><td>Whether to preserve current links on pages or clear them</td></tr><tr><td>import-bookmarks</td><td>No</td><td>bool</td><td>false</td><td>Whether to import bookmarks from the PDF as index. Assumes preserve-index=false</td></tr><tr><td>import-links</td><td>No</td><td>bool</td><td>false</td><td>Whether to import links from the PDF. If true, ’import-links-styleid’ must be specified</td></tr><tr><td>import-links-styleid</td><td>When ‘import-links’ = true</td><td>int</td><td> </td><td>The linkstyle ID of style that imported links should assume. If you’re unsure of the ID, reach out to support</td></tr><tr><td>password</td><td>No</td><td>string</td><td> </td><td>Password to unlock protected PDF. Will fail if PDF is protected and correct password is not provided</td></tr><tr><td>preprocessors</td><td>No</td><td>XML</td><td> </td><td>Preprocessors that needs to be run before the PDF is processed</td></tr><tr><td>custom-link-import-configuration</td><td>No</td><td>string</td><td> </td><td>The configuration XML for the custom link import to be executed. This should only be used if instructed to do so by iPaper</td></tr><tr><td>custom-link-import-name</td><td>No</td><td>string</td><td> </td><td>The name of the enrichment automation configuration that should be used when processing the PDF.</td></tr></tbody></table>

**NB!:** xmlOptions should be wrapped in a root node `<options />` like shown in the sample below.

```xml
<options><preserve-links>true</preserve-links><import-bookmarks>true</import-bookmarks></options>
```

## Sample Response

<pre class="language-xml"><code class="lang-xml">&#x3C;?xml version="1.0" encoding="utf-8"?>
&#x3C;result>
  &#x3C;code>
    &#x3C;![CDATA[SUCCESS]]>
  &#x3C;/code>
  &#x3C;message>
    &#x3C;![CDATA[Process queued successfully.]]>
  &#x3C;/message>
  &#x3C;data>
    &#x3C;JobGuid>
      &#x3C;![CDATA[ 05d5ef54-6667-47f7-97c3-41bec10438d7 ]]>
    &#x3C;/JobGuid>
<strong>  &#x3C;/data>
</strong>&#x3C;/result>
</code></pre>

## Return Codes

* SUCCESS
* ERROR
* RIPPER\_CANNOT\_PROCESS\_PAPER\_ALREADY\_BEING\_PROCESSED
* RIPPER\_FILE\_IS\_NOT\_PDF
* RIPPER\_INVALID\_BASE64\_PDF\_FILE
* RIPPER\_PDF\_FILE\_DOES\_NOT\_EXIST
* LICENSE\_DOES\_NOT\_ALLOW\_PROCESSING


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ipaper.io/flipbook-backend-api/ripper/process-pdf.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
