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
Direct Download
Read full article as PDF:
Price $2.95
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Find SysAdmin Jobs
News
-
CarbonOS: A New Linux Distro with a Focus on User Experience
CarbonOS is a brand new, built-from-scratch Linux distribution that uses the Gnome desktop and has a special feature that makes it appealing to all types of users.
-
Kubuntu Focus Announces XE Gen 2 Linux Laptop
Another Kubuntu-based laptop has arrived to be your next ultra-portable powerhouse with a Linux heart.
-
MNT Seeks Financial Backing for New Seven-Inch Linux Laptop
MNT Pocket Reform is a tiny laptop that is modular, upgradable, recyclable, reusable, and ships with Debian Linux.
-
Ubuntu Flatpak Remix Adds Flatpak Support Preinstalled
If you're looking for a version of Ubuntu that includes Flatpak support out of the box, there's one clear option.
-
Gnome 44 Release Candidate Now Available
The Gnome 44 release candidate has officially arrived and adds a few changes into the mix.
-
Flathub Vying to Become the Standard Linux App Store
If the Flathub team has any say in the matter, their product will become the default tool for installing Linux apps in 2023.
-
Debian 12 to Ship with KDE Plasma 5.27
The Debian development team has shifted to the latest version of KDE for their testing branch.
-
Planet Computers Launches ARM-based Linux Desktop PCs
The firm that originally released a line of mobile keyboards has taken a different direction and has developed a new line of out-of-the-box mini Linux desktop computers.
-
Ubuntu No Longer Shipping with Flatpak
In a move that probably won’t come as a shock to many, Ubuntu and all of its official spins will no longer ship with Flatpak installed.
-
openSUSE Leap 15.5 Beta Now Available
The final version of the Leap 15 series of openSUSE is available for beta testing and offers only new software versions.