> For the complete documentation index, see [llms.txt](https://docs.viesus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.viesus.com/use-cases/pdf-photobook-workflow.md).

# PDF Processing

**The scenario:** A print production platform receives photobook and catalogue PDFs from customers. Each PDF contains many embedded images at print-insufficient resolution. The platform needs to upscale and enhance every embedded image, then route the finished PDF to the print queue — automatically, as files arrive.

***

## Recommended interface

{% hint style="info" %}
Use the [**VIESUS PDF Enhancer**](/reference/pdf-cli.md) in **hotfolder mode**. It works directly on PDFs — enhancing the embedded images while preserving layout, text, and vector content — and can run unattended as a watched-folder service.
{% endhint %}

The PDF Enhancer is the only interface that operates inside PDFs. For standalone image files use the [CLI](/use-cases/photo-lab-batch.md); for an API-driven cloud flow that also handles PDFs, see [Cloud API Integration](/use-cases/cloud-api-integration.md).

***

## How it works

* A **hotfolder** watches an incoming directory. When a PDF lands, the enhancer analyses it, enhances (and optionally upscales) each qualifying embedded image to your target print resolution, and writes a new PDF to the output folder.
* Source files can be archived automatically, and a per-file XML report records how many images were processed, enhanced, or skipped — and an error code you can check before routing to print.
* It typically runs as a background service so the whole queue is processed without manual steps. A **standalone mode** is also available for one-off files or when you need to exclude specific pages.

***

## What to consider

| Factor                        | Guidance                                                                                                                                              |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Mode**                      | Hotfolder for continuous queues; standalone for one-off files or page exclusions.                                                                     |
| **Target resolution**         | Set the print DPI and cap the upscaling factor to avoid over-enlargement.                                                                             |
| **Classical vs AI upscaling** | Classical upscaling is fast and fine for most jobs; AI upscaling gives the best quality for premium products but needs an NVIDIA GPU and runs slower. |
| **Filtering**                 | Background fills and very small images can be skipped so only real photos are enhanced.                                                               |
| **GPU contention**            | Run one instance per GPU to avoid out-of-memory errors.                                                                                               |
| **Validation**                | Always check the XML report's error code before sending a PDF to the print queue.                                                                     |
| **Limitations**               | Password-protected PDFs can't be opened; very large PDFs need more memory.                                                                            |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.viesus.com/use-cases/pdf-photobook-workflow.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
