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
-
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.
-
ZorinOS 17.1 Released, Includes Improved Windows App Support
If you need or desire to run Windows applications on Linux, there's one distribution intent on making that easier for you and its new release further improves that feature.
-
Linux Market Share Surpasses 4% for the First Time
Look out Windows and macOS, Linux is on the rise and has even topped ChromeOS to become the fourth most widely used OS around the globe.
-
KDE’s Plasma 6 Officially Available
KDE’s Plasma 6.0 "Megarelease" has happened, and it's brimming with new features, polish, and performance.
-
Latest Version of Tails Unleashed
Tails 6.0 is based on Debian 12 and includes GNOME 43.
-
KDE Announces New Slimbook V with Plenty of Power and KDE’s Plasma 6
If you're a fan of KDE Plasma, you'll be thrilled to hear they've announced a new Slimbook with an AMD CPU and the latest version of KDE Plasma desktop.
-
Monthly Sponsorship Includes Early Access to elementary OS 8
If you want to get a glimpse of what's in the pipeline for elementary OS 8, just set up a monthly sponsorship to help fund its continued existence.
-
DebConf24 to be Held in South Korea
Busan will be the location of the latest DebConf running July 28 through August 4