A tiny layout library on top of pdfbox. Main features are
- word wrapping
- text alignment
- paragraphs
- pagination
See the Wiki for more information on the usage, or browse the javadoc.
These articles may also be useful as a short introduction:
- PDF text layout made easy with PDFBox-Layout
- Creating Lists with PDFBox-Layout
- Hyperlinks with PDFBox-Layout
The library comes in two flavors: one for Apache pdfbox 1.8.x, and the other for pdfbox 2.x
artifactId | pdfbox version |
---|---|
pdfbox1-layout | pdfbox 1.8.x |
pdfbox2-layout | pdfbox 2.x |
As of 0.2.0 pdfbox-layout is available from jitpack.io.
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
...
<dependency>
<groupId>com.github.ralfstuckert.pdfbox-layout</groupId>
<artifactId>pdfbox2-layout</artifactId>
<version>1.0.1</version>
</dependency>
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.ralfstuckert.pdfbox-layout:pdfbox2-layout:1.0.1'
}
artifact | pdfbox1-layout | pdfbox2-layout |
---|---|---|
binary | pdfbox1-layout-1.0.1.jar | pdfbox2-layout-1.0.1.jar |
sources | pdfbox1-layout-1.0.1-sources.jar | pdfbox2-layout-1.0.1-sources.jar |
javadoc | pdfbox1-layout-1.0.1-javadoc.jar | pdfbox2-layout-1.0.1-javadoc.jar |
examples | pdfbox1-layout-1.0.1-examples.jar | pdfbox2-layout-1.0.1-examples.jar |