> For the complete documentation index, see [llms.txt](https://openendpoints.gitbook.io/doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://openendpoints.gitbook.io/doc/configuration/pdf-created-with-xslt.md).

# PDF Created With XSLT

Originally XSLT specifically was designed to support a 2-step process of

1. **Transformation:** In the first step an XML document transforms into another XML document containing information about how to display the document: what font to use, the size of a page, etc. This markup is called `Formatting Objects`. Note that the resulting XML document not only contains formatting information, but is also stores all of the document's data within itself.
2. **Formatting:** Some software (called “FO-Processor”) transforms the result of the first step (transformation) into the intended output format. For example, Apache™ FOP (Formatting Objects Processor) is an output independent formatter, which can generate PDF.

OpenEndpoints uses Apache™ FOP to generate PDF.

The data-source transformer refers to a XSLT that creates XSL-FO (=an xml containing content + formatting options).

```xml
<transformer data-source="[data-source]">
    <xslt-file name="[xslt-which-creates-xsl-fo]"/>
    <convert-output-xsl-fo-to-pdf/>
</transformer>
```

In the example above the 2-step process is:

1. `[xslt-which-creates-xsl-fo]` transforms `[data-source]` into the `xsl-fo-output` = an xml containing content + formatting options.
2. The option `<convert-output-xsl-fo-to-pdf/>` triggers the function to send `xsl-fo-output` to Apache FOP, which will generate PDF.

The Apache FOP integration with OpenEndpoints includes easy to use options to

* [Embedding Images](/doc/configuration/pdf-created-with-xslt/embedding-images.md) into the generated PDF
* Embedding Fonts such as Google Fonts into your generated PDF

## Advantages of XSL-FO

XSL-FO is a very mature standard for page composition, which was designed for paged media. It is capable of comprehensive layout functionality, which makes it possible to create error-free but also beautiful layouts. For example: Pagination controls to avoid “widows” and “orphans”, the support of multiple columns, indexing, etc. It is the perfect technology to produce “content-driven” design.

For more advantages and disadvantages of XSL-FO see: <https://en.wikipedia.org/wiki/XSL_Formatting_Objects>


---

# 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://openendpoints.gitbook.io/doc/configuration/pdf-created-with-xslt.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.
