PDF creators, extractors, and editors tested
Pdf2svg
The pdf2svg tool relies on Poppler and Cairo to convert some or all PDF pages into SVG format [8]. The SVG files can then be approximately disassembled or edited with Inkscape. Pdf2svg (v0.2.2) chops up text with no discernible rules and dumps each snippet into a separate text box.
That said, the layout remained remarkably intact in all the test documents. The same is true of vector graphics; pdf2svg stores bitmap images within the generated SVG file. Only the color gradients in the PDF files generated by Scribus disappeared; the bars on the cover page, for example, came out solid red. The tool cannot handle password-protected PDF documents.
Inconsistent All-Rounder
Although these test documents did not cover all aspects of PDF exports and imports, they definitely provided some interesting results (see Table 1). Inkscape, LibreOffice Writer, and Scribus by no means offer the functionality and capabilities of Adobe Acrobat, but they do generate standards-compliant and pretty good PDF documents.
Table 1
Function Test – Read and Edit PDFs
Creator | Inkscape | LibreOffice Writer | Scribus | InDesign |
---|---|---|---|---|
Editor |
||||
Inkscape |
Good |
Good |
Good |
Good |
LibreOffice Draw |
Satisfactory |
Good |
Satisfactory |
Satisfactory |
Scribus |
Poor |
Poor |
Poor |
Poor |
Program |
||||
gPDFText |
Good |
Good |
Good |
Good |
Mutool |
Good |
Good |
Good |
Good |
Pdftotext |
Good, can keep layout |
Good, can keep layout |
Good, can keep layout |
Good, can keep layout |
Pdfimages |
Good |
Good |
Good |
Good |
Pdftohtml |
Satisfactory |
Satisfactory |
Satisfactory |
Satisfactory |
Pdf2svg |
Good |
Good |
Good |
Good |
When it came to importing PDF documents, major differences were revealed. Inkscape imported documents without complaint; the layout is preserved and the text remained editable – although not in a particularly convenient way. However, the drawing program can only open one page at a time. LibreOffice best understands the PDF files it generates itself; with other PDFs, users may be faced with a slightly damaged layout. In our lab, the Scribus desktop publishing program failed to open even one PDF file without error and was relegated from the import league in the first round.
Lean Specialists
The small special tools for the command line did better. With pdftotext, for example, the layout may be history after conversion, but at least the text was kept in full. However, if somebody stored the text in the PDF as paths, pdftotext is powerless. The same applies to gPDFText, which produces a huge block of text. The text from columns are also nested within each other.
Mutool extracts all images and fonts from the PDFs. In terms of fonts, you simply have to hope that the author embedded the complete font. The probability for this is highest in documents from LibreOffice and Inkscape. Mutool always outputs images in PNG format. Pdfimages takes over here, which – exactly like Mutool – extracts all the bitmap images from a PDF.
If you want to extract vector graphics from a PDF, your only option is to turn to pdf2svg and use Inkscape for cutting and downstream processing. pdftohtml is only usable for simple PDF documents. Here, users would fare better to extract the items with the other tools and then manually assemble them into an HTML document.
Infos
- Openclipart: http://openclipart.org
- "PHP-CLI" by Tim Schürmann, Linux Magazine, issue 140, pg. 42: http://www.linux-magazine.com/Issues/2012/140/PHP-CLI
- "Charly's Column: Backup2l" by Charly Kühnast, Linux Magazine, issue 46, pg. 46: http://www.linux-magazine.com/Issues/2014/159/Charly-s-Column-Backup2l
- gPDFText: http://gpdftext.sourceforge.net
- MuPDF: http://www.mupdf.com
- PostScript font formats: http://en.wikipedia.org/wiki/PostScript_fonts
- Poppler: http://poppler.freedesktop.org
- Pdf2svg: http://www.cityinthesky.co.uk/opensource/pdf2svg/
« Previous 1 2 3 4
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Endless OS 6 has Arrived
After more than a year since the last update, the latest release of Endless OS is now available for general usage.
-
Fedora Asahi 40 Remix Available for Macs with Apple Silicon
If you've been anticipating KDE's Plasma 6 for your Apple Silicon-powered Mac, then you're in luck.
-
Red Hat Adds New Deployment Option for Enterprise Linux Platforms
Red Hat has re-imagined enterprise Linux for an AI future with Image Mode.
-
OSJH and LPI Release 2024 Open Source Pros Job Survey Results
See what open source professionals look for in a new role.
-
Proton 9.0-1 Released to Improve Gaming with Steam
The latest release of Proton 9 adds several improvements and fixes an issue that has been problematic for Linux users.
-
So Long Neofetch and Thanks for the Info
Today is a day that every Linux user who enjoys bragging about their system(s) will mourn, as Neofetch has come to an end.
-
Ubuntu 24.04 Comes with a “Flaw"
If you're thinking you might want to upgrade from your current Ubuntu release to the latest, there's something you might want to consider before doing so.
-
Canonical Releases Ubuntu 24.04
After a brief pause because of the XZ vulnerability, Ubuntu 24.04 is now available for install.
-
Linux Servers Targeted by Akira Ransomware
A group of bad actors who have already extorted $42 million have their sights set on the Linux platform.
-
TUXEDO Computers Unveils Linux Laptop Featuring AMD Ryzen CPU
This latest release is the first laptop to include the new CPU from Ryzen and Linux preinstalled.