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)