PDF types in LibreOffice

Custom Export

© Photo by naomi tamar on Unsplash

© Photo by naomi tamar on Unsplash

Article from Issue 222/2019
Author(s):

With LibreOffice, you can customize the way you export PDFs.

LibreOffice and related apps have supported the PDF format for over a decade. If nothing else, LibreOffice is a free alternative to the $15 monthly fee required to license Adobe Acrobat tools.

Most people exporting a PDF from LibreOffice just use the default settings, exporting to PDF as quickly as possible. However, those who are more hands-on know that they can do more than accept the default. If users choose, they can customize everything from the pages to export to the look of the exported file in a reader and its initial view from File | Export as | Export as PDF…. By clicking on the General tab, you can see that those options include four PDF format variants: Hybrid, Archive, Tagged, and PDF forms (Figure 1). Each of these PDF types requires different preparation.

Figure 1: The four PDFs that LibreOffice supports.

Hybrid PDFs

Hybrid PDFs are two files in one: a PDF file and an Open Document Format (ODF) file, which is LibreOffice's default format. A Hybrid PDF acts like a normal PDF file in a reader, but it can open in the appropriate LibreOffice module – Writer, Calc, or Impress.

Why would you want a Hybrid PDF? The reason is simple. LibreOffice has supported editing of PDF files in Draw for years. Draw is a useful PDF viewer, because it supports multiple pages and includes a pane for jumping from one page to another, just like a dedicated PDF reader.

However, your ability to edit is limited. Images can be edited freely, but text in a PDF is structured line by line (Figure 2). You can change words within a line. If there is enough white space, you can even add a line. However, any changes longer than a line require editing the line below as well. In no time at all, you can have cascading changes and endless lines to edit. More substantial edits, such as adding or deleting a paragraph – let alone a page – can be almost impossible.

Figure 2: LibreOffice supports editing PDFs in Draw, but the PDF's structure means that editing is line by line.

By contrast, the ODF file in a Hybrid PDF opens in the appropriate LibreOffice module and can be edited as easily as the original file. When you are finished, the changes are passed on to the Hybrid PDF as you save. What might take an hour to edit in an ordinary PDF can be reduced to a couple of minutes in a Hybrid PDF.

As a side benefit, you can store both formats in the same document, reducing the number of files you need to track.

One drawback to a Hybrid PDF is that it is two files in one, and therefore about 50 percent larger than an ordinary PDF file. Another drawback is that there is no way to identify a Hybrid PDF in a file manager. You can only open the Hybrid PDF in LibreOffice and see in which LibreOffice module it opens. Yet even that may not help, because Tagged PDFs, ordinary PDFs, and Hybrid PDFs created in Draw will all open in Draw. The easiest way to identify Hybrid PDFs is to save them to a directory called Hybrid PDFs.

Archive PDFs

Changing formats – especially proprietary ones – means that the software needed to read and edit documents written today may not be available at some point in the future. Open source formats are generally considered the best hedge against this possibility, but Adobe has released an open standards solution in the form of PDF/A (ISO 19005-1). In the short term, the format is useful for ensuring that a PDF can be read on any system, regardless of its resources.

A PDF/A file is a PDF that contains everything necessary to display the file; it embeds fonts, images, and anything else that the document requires. In addition, when creating an archive file, you might want to fill out the fields in Tools | Options |Personal Data, as well as the metadata fields in Files | Properties. In particular, the Description and Custom Properties tabs can be used. Include any information that you think someone else using the file might need to know.

Note that Archive PDF files can be huge, especially if a document contains several different fonts. To give you an idea, an Archive PDF file with no images using a single font is almost half as big again as the same document in an ordinary PDF.

Tagged PDFs

When you open File | Export As | Export as PDF, you'll find Tagged PDF (add document structure) already selected. The reason for this default is that Tagged PDFs have several advantages over ordinary PDFs while adding little to the file size. In fact, online, you often find recommendations that everyone should be using Tagged PDFs.

A Tagged PDF contains meta-information about the structure and layout of the document, adding far more details than are contained in an ordinary PDF, which is formatted by the position of lines on a page. This information is unseen in PDF readers, but has a number of advantages.

To start with, a Tagged PDF opens quicker. For another, when all or part of a file is copied to another application, it displays as a single graphic file and does not need to be reformatted, which makes recovery of information easier, as well as making reading easier for other applications, such as accessibility tools, to import and manipulate the file. Other tags can also be added, such as geographic information. In general, a Tagged PDF makes the PDF format easier to work with, although it opens in Draw in LibreOffice.

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

Direct Download

Read full article as PDF:

Price $2.95

News