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
-
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.
-
XZ Gets the All-Clear
The back door xz vulnerability has been officially reverted for Fedora 40 and versions 38 and 39 were never affected.
-
Canonical Collaborates with Qualcomm on New Venture
This new joint effort is geared toward bringing Ubuntu and Ubuntu Core to Qualcomm-powered devices.
-
Kodi 21.0 Open-Source Entertainment Hub Released
After a year of development, the award-winning Kodi cross-platform, media center software is now available with many new additions and improvements.
-
Linux Usage Increases in Two Key Areas
If market share is your thing, you'll be happy to know that Linux is on the rise in two areas that, if they keep climbing, could have serious meaning for Linux's future.
-
Vulnerability Discovered in xz Libraries
An urgent alert for Fedora 40 has been posted and users should pay attention.
-
Canonical Bumps LTS Support to 12 years
If you're worried that your Ubuntu LTS release won't be supported long enough to last, Canonical has a surprise for you in the form of 12 years of security coverage.
-
Fedora 40 Beta Released Soon
With the official release of Fedora 40 coming in April, it's almost time to download the beta and see what's new.
-
New Pentesting Distribution to Compete with Kali Linux
SnoopGod is now available for your testing needs
-
Juno Computers Launches Another Linux Laptop
If you're looking for a powerhouse laptop that runs Ubuntu, the Juno Computers Neptune 17 v6 should be on your radar.