A simple Java library for creating simple PDFs.
- Single page with multiple lines of text
- No automatic line breaks though
- Page layout s A4 portrait
- Font is Times-Roman 18pt
- Document information metadata
- ISO/IEC 8859-1 encoding for printed text and metadata
import com.github.stengerh.simplepdfwriter.SimplePDFWriter;
...
OutputStream out = ...;
try (SimplePDFWriter pdfWriter = SimplePDFWriter.builder()
.title("Simple PDF")
.author("Me")
.creationDate(OffsetDateTime.now())
.build(out)) {
pdfWriter.println("Hello world!");
}
- Java 8
- Runtime dependencies: none
- Test dependencies:
- JUnit 5
See Github releases.
No Maven repository available yet.