Two different things produce PDF files.
| Raster export | Vector documents | |
|---|---|---|
| API | image.pdf(pageSize:margins:anchor:background:maxEffectiveDPI:metadata:) |
VectorDocument of VectorPages |
| Module | Hokusai | HokusaiPDF |
| Content | The evaluated pipeline as one raster page | Backgrounds, rectangles, lines, images and real, selectable text |
| Needs | Cairo with PDF support | Pango 1.44 or newer |
Raster pages are sized from the image (.image(dpi:)), as .a4, .letter or exact .points. Vector text is laid out by Pango with a typed VectorTextStyle and can be plain or markup; fills can be solid colours or linear gradients.