Portable Document Format: Difference between revisions
Line 58: | Line 58: | ||
* [http://osp.kitchen/tools/pdfutils/tree/master/rgb2cmyk.sh#project-detail-files rgb2cmyk.sh] (using Ghostscript), part of [http://osp.kitchen/tools/pdfutils/ OSP's pdfutils] | * [http://osp.kitchen/tools/pdfutils/tree/master/rgb2cmyk.sh#project-detail-files rgb2cmyk.sh] (using Ghostscript), part of [http://osp.kitchen/tools/pdfutils/ OSP's pdfutils] | ||
* [http://osp.kitchen/tools/pdfutils/tree/master/colorSeparation.sh#project-detail-files coloseperation.sh] (using Ghostscript), part of [http://osp.kitchen/tools/pdfutils/ OSP's pdfutils] | * [http://osp.kitchen/tools/pdfutils/tree/master/colorSeparation.sh#project-detail-files coloseperation.sh] (using Ghostscript), part of [http://osp.kitchen/tools/pdfutils/ OSP's pdfutils] | ||
* [[resize.sh]] (using Ghostscript), via [http://osp.kitchen OSP] | |||
==Examples== | ==Examples== |
Revision as of 13:20, 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
- https://www.vice.com/en/article/pam43n/why-the-pdf-is-secretly-the-worlds-most-important-file-format
- https://planetpdf.com/planetpdf/pdfs/warnock_camelot.pdf
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)
- Scribus https://www.scribus.net/
- Laidout https://laidout.org/
- Inkscape https://inkscape.org/
Web based (web-to-print)
- your browser (based on CSS Paged Media): use CTRL+P/CMD+P
- Weasyprint https://weasyprint.readthedocs.io/
- Paged.js https://www.pagedjs.org/
- wkhtmltopdf https://wkhtmltopdf.org/
- OSPKit (CSS Regions legacy support!) http://osp.kitchen/tools/ospkit/
Python
- ReportLab https://www.reportlab.com/
- Flat http://xxyxyz.org/flat/
- pyPDF2 https://github.com/mstamy2/PyPDF2
LaTeX based
Misc
PDF manipulating/editing tools
- pdftk (the PDF toolkit)
- pdfimages (part of poppler-utils)
- pdfunite (part of poppler-utils)
- pdftotext (part of poppler-utils)
- pdfinfo (part of poppler-utils)
- pdffonts (part of poppler-utils)
- rgb2cmyk.sh (using Ghostscript), part of OSP's pdfutils
- coloseperation.sh (using Ghostscript), part of OSP's pdfutils
- resize.sh (using Ghostscript), via OSP
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()