Questo contenuto non è disponibile nella lingua selezionata.

Chapter 125. PDF


PDF

Available as of Camel 2.16.0
The PDF component provides the ability to create, modify or extract content from PDF documents. This component uses Apache PDFBox as underlying library to work with PDF documents.
In order to use the PDF component, Maven users will need to add the following dependency to their pom.xml:
<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-pdf</artifactId>
    <version>2.17.0.redhat-630xxx</version>
    <!-- use the same version as your Camel core version -->
</dependency>
Copy to Clipboard Toggle word wrap

URI format

The PDF component only supports producer endpoints.
pdf:operation[?options]
Copy to Clipboard Toggle word wrap
Where operation is the specific action to perform with PDF document.

Operations

Expand
NameDefault ValueDescription
marginTop
20
Sets the margin size in pixels between text and top edge of the page.
marginBottom
20
Sets the margin size in pixels between text and bottom edge of the page.
marginLeft
20
Sets the margin size in pixels between text and left edge of the page.
marginRight
40
Sets the margin size in pixels between text and right edge of the page. This option is ignored when textProcessingFactory option is lineTermination.
fontSize
14
Sets the font size in pixels.
pageSize
PAGE_SIZE_A4
Sets the size of a page. Possible values
  • PAGE_SIZE_A0
  • PAGE_SIZE_A1
  • PAGE_SIZE_A2
  • PAGE_SIZE_A3
  • PAGE_SIZE_A4
  • PAGE_SIZE_A5
  • PAGE_SIZE_A6
  • PAGE_SIZE_LETTER
font
Helvetica
One of the base fonts in PDFBox.
textProcessingFactory
lineTermination
Sets the text processing factory. lineTermination - builds set of classes for line-termination writing strategy. Text getting sliced by line termination symbol and then it will be written regardless it fits in the line or not. autoFormatting - Text is getting sliced by words, then maximum amount of words that fits in the line will be written into PDF document. With this strategy all words that doesn't fit in the line will be moved to the new line.

Headers

Expand
Header
pdf-document
Mandatory header for append operation and ignored in all other operations. Expected type is PDDocument. Stores PDF document which will be used for append operation.
protection-policy
Expected type is ProtectionPolicy. If specified then PDF document will be encrypted with it.
decryption-material
Expected type is DecryptionMaterial. Mandatory header if PDF document is encrypted.
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat