Customizing file formats with unoconv
PDF Export Settings
Unoconv does not import PDF files. However, its settings for PDF export are numerous. The man page gives only a list of settings without a full explanation of any of them. However, a full explanation, as well as valid options for each setting, is available online [4].
As a quick reference, you can also open LibreOffice and click File | Export to PDF to study the options in the PDF dialog window. For instance, on the General tab, the drop-down list of choices for Reduce image resolution shows the valid setting for MaxImageResolution=
. Other options, such as EnableCopyingOfContent=
, can be completed with True or False, or, like Changes
, with 0 for off and 1 for on. With research, you should be able to use many of the available settings. Some, like EmbedStandardFonts
only need to be listed. Each setting should be entered with a separate --export
option, if only to make revision of the command easier.
Some of the most commonly used PDF export settings are listed in Table 1. Their names should make most of their purposes reasonably clear.
Table 1
Common PDF Export Settings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
If researching all the settings is more work than you want to undertake – especially for a single operation you are unlikely to repeat – the default filter for PDF export should be acceptable for most purposes.
Graphics Export Settings
Unoconv's graphic support for exporting includes .jpg
, .png
, .gif
, and .eps
file formats, entered in lowercase letters. All these formats support Height
, Width
, and Resolution
settings, making unoconv a convenient way to standardize all the illustrations for an article or a book. In addition, each format supports other settings (Table 2). As with PDF export settings, the man page lists only the settings for graphic formats, leaving you to research valid settings on your own.
Table 2
Unique Settings for Graphic Formats
|
|
|
|
|
|
|
|
The Conversion Toolbox
Unoconv does have a few gaps in its functionality. Its man page lists several specialized scripts that you might need, including asciidoc-odf for converting plain text to the Open Document Format used in LibreOffice and other free office applications [5] and docbook2odf for converting DocBook XML to Open Document Format [6].
However, in many cases, unoconv offers exact imports and exports for common free office formats. It combines the advantages of sensible and easy-to-use defaults with thorough flexibility – if only you take the time to research the possibilities. Especially if you need to do batch file conversions, unoconv remains one of the best hidden utilities in the LibreOffice/OpenOffice toolbox.
Infos
- unoconv: https://github.com/dagwieers/unoconv
- UNO API: https://api.libreoffice.org/
- Standard import and export settings: https://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options
- PDF export: http://wiki.services.openoffice.org/wiki/API/Tutorials/PDF_export
- asciidoc-odf: http://github.com/dagwieers/asciidoc-odf
- docbook2odf: http://open.comsultia.com/docbook2odf/
« Previous 1 2
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
-
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.
-
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