User guide

View Source

Choose the task you want to perform.

I want toGuide
Create a PDF from HTMLRendering examples
Check which HTML and CSS I can useHTML and CSS support
Compare supported rendering with a browserBrowser rendering
Read or change a PDF's title, author, or datesPDF information
Get page counts and dimensionsPage geometry
Extract text or its position on a pageText extraction
Combine PDFsMerging
Select, reorder, delete, rotate, or split pagesPage transforms
Add or read bookmarksOutlines
Add a watermark, stamp, letterhead, or page numbersStamping
Inspect, fill, or flatten form fieldsPDF forms
Embed files or list attachmentsPDF attachments
Check whether a PDF can be readPDF validation
Use PNG/SVG assets and handle image failuresImage processing
Handle an errorDiagnostics
Adjust document size or processing limitsResource limits

Working with files

Most PDF operations accept file contents as a binary:

alias NativeElixirPdfUtilities.Info

with {:ok, pdf} <- File.read("report.pdf") do
  Info.page_count(pdf)
end

HTML rendering and text extraction also provide file helpers. Each task guide shows the relevant function and its return value.

Inspecting PDF syntax

For access to individual PDF objects, use the PDF reader. For raw syntax tokens and byte positions, use the tokenizer. Neither is needed for the common tasks above.

See Licenses for the project and bundled-data notices, and the Changelog for released changes.