Portable Document Format: Difference between revisions

From XPUB & Lens-Based wiki
Line 27: Line 27:
===Web based (web-to-print)===
===Web based (web-to-print)===


* your browser (use CTRL+P or CMD+P)
* your browser (based on [[Paged_Media_CSS_examples|CSS Paged Media]]): use CTRL+P/CMD+P
* Weasyprint https://weasyprint.readthedocs.io/
* [[Weasyprint]] https://weasyprint.readthedocs.io/
* Paged.js https://www.pagedjs.org/
* [[Paged.js]] https://www.pagedjs.org/
* wkhtmltopdf https://wkhtmltopdf.org/
* wkhtmltopdf https://wkhtmltopdf.org/
* OSPKit (CSS Regions legacy support!) http://osp.kitchen/tools/ospkit/
* OSPKit (CSS Regions legacy support!) http://osp.kitchen/tools/ospkit/

Revision as of 08:48, 3 October 2023


A proprietary format owned by Adobe until 2008, when it was released and relicensed as an ISO standard.

http://en.wikipedia.org/wiki/Portable_Document_Format

Readings

PDF, Ghostscript, Postscript

...

F/LOSS tools to make PDFs

Thanks to the Ghostscript project, there are many free software tools that work with postscript and PDF.

Canvas based (GUI)

Web based (web-to-print)

Python

LaTeX based

Misc

PDF manipulating/editing tools

Examples

Pandoc

$ pandoc -f markdown --pdf-engine weasyprint -c stylesheet.css filename.md -o filename.pdf

Weasyprint

$ weasyprint -s stylesheet.css filename.html filename.pdf

Reportlab

from reportlab.pdfgen import canvas
from reportlab.lib.units import inch, cm
c = canvas.Canvas('ex.pdf')
c.drawImage('ar.jpg', 0, 0, 10*cm, 10*cm)
c.showPage()
c.save()