Portable Document Format: Difference between revisions

From XPUB & Lens-Based wiki
 
(13 intermediate revisions by the same user not shown)
Line 2: Line 2:




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


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


[[resize.sh]] (using Ghostscript), via [http://osp.kitchen OSP]
[[resize.sh]] (using Ghostscript), via [http://osp.kitchen OSP]
[https://github.com/24eme/signaturepdf Signature PDF] (web GUI for pdf signing, editing, combining, compression)


[[Imposition|imposition tools]] (multiple)
[[Imposition|imposition tools]] (multiple)
== 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 [[Paged_Media_CSS_examples|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===
* rinohtype (http://www.mos6581.org/rinohtype/master/)
* [[ReportLab]] https://www.reportlab.com/
* Flat http://xxyxyz.org/flat/
* pyPDF2 https://github.com/mstamy2/PyPDF2
===LaTeX based===
* LaTeX https://www.latex-project.org/
* ConTeXt  https://wiki.contextgarden.net/Main_Page
===Misc===
* groff https://www.gnu.org/software/groff/
* SILE https://sile-typesetter.org/
* [[Imagemagick]] https://imagemagick.org/
==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===
<syntaxhighlight lang="python">
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()
</syntaxhighlight>


==See also==
==See also==


* [[How to PDF]]
* [[Imposition]] tools, to rearrange PDFs
* [[Imposition]] tools, to rearrange PDFs
* [[Typesetting Tools]]
* [[Typesetting Tools]]
* [[CSS Print]]
* [[:Category:PagedMedia]]
* [[:Category:PagedMedia]]
* [[:Category:FLOSS design]]


[[Category:PagedMedia]]
[[Category:PagedMedia]]
[[Category:Cookbook]]
[[Category:Cookbook]]

Latest revision as of 11:34, 8 July 2026


A proprietary format launched in 1992, owned by Adobe until 2008, after which it was released and relicensed as an ISO standard.

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

Readings

PDF & Postscript

PDF manipulating/editing tools

pdftk (the PDF toolkit)

pdfimages (part of poppler-utils)

pdfunite (part of poppler-utils)

pdftotext (part of poppler-utils)

$ pdftotext filename.pdf
$ pdftotext -layout filename.pdf (Maintain (as best as possible) the original physical layout of the text.)

pdfinfo (part of poppler-utils)

$ pdfinfo filename.pdf
$ pdfinfo -meta filename.pdf (print metadata)
$ pdfinfo -url filename.pdf (print all urls)
$ pdfinfo -dests filename.pdf (print all internal links)

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

Signature PDF (web GUI for pdf signing, editing, combining, compression)

imposition tools (multiple)

See also