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

  1. Openclipart: http://openclipart.org
  2. "PHP-CLI" by Tim Schürmann, Linux Magazine, issue 140, pg. 42: http://www.linux-magazine.com/Issues/2012/140/PHP-CLI
  3. "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
  4. gPDFText: http://gpdftext.sourceforge.net
  5. MuPDF: http://www.mupdf.com
  6. PostScript font formats: http://en.wikipedia.org/wiki/PostScript_fonts
  7. Poppler: http://poppler.freedesktop.org
  8. Pdf2svg: http://www.cityinthesky.co.uk/opensource/pdf2svg/

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
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.

Learn More

News