True vector PDF output from Java Swing components
Convert any JComponent tree into genuine vector PDF. Text stays selectable, graphics stay sharp at any zoom level, and file sizes stay small. Built on Apache PDFBox.
Everything you need to turn Swing UIs into production-quality PDFs
Text, shapes, and lines render as native PDF drawing operations — not rasterized images. Output is crisp at any zoom level and a fraction of the file size.
Export JTextField, JCheckBox, JRadioButton, JComboBox, JTextArea, and JPasswordField as fillable PDF form fields with a single method call.
JTextPane and JEditorPane content renders with full formatting preserved — bold, italic, fonts, colors, and HTML.
Specialized rendering for JTable, JTree, JList, JTabbedPane, JTextPane, JEditorPane, and more. Each component gets purpose-built handling.
No native dependencies, no commercial PDF engine. Pure Java built on the trusted, open-source Apache PDFBox 3.x library.
Free under AGPL-3.0 for open-source projects. One-time commercial license available for proprietary applications — no royalties, no recurring fees.
Add the dependency, write three lines of code, and you have a PDF
<dependency>
<groupId>com.seaglassfoundry</groupId>
<artifactId>swingtopdf</artifactId>
<version>1.0.1</version>
</dependency>
import com.seaglassfoundry.swingtopdf.SwingPdfExporter;
import com.seaglassfoundry.swingtopdf.api.PageSize;
// Any JComponent — JPanel, JTable, JTabbedPane...
JPanel panel = buildYourUI();
SwingPdfExporter.from(panel)
.pageSize(PageSize.A4)
.margins(36, 36, 36, 36)
.title("My Report")
.export(Path.of("report.pdf"));
Choose the license that fits your project
Free for open-source projects
For proprietary applications — from $399