[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to create a PDF-Printer from the command line



On Sun 07 Jan 2018 at 11:06:01 +0000, Curt wrote:

> On 2018-01-07, Brian <ad44@cityscape.co.uk> wrote:
> >> >
> >> > How does one convert a text file to a PDF using the command line?
> >> >
> >> 
> >>  unoconv -f pdf text.txt
> >
> > 50+ megabytes of the libreoffice stack to install, But yes, that will
> > do it. A sledgehammer to crack a nut.
> 
> Depends on the nut, doesn't it?
> 
> Anyhoo, I don't understand where you get the 50+ megabytes. I see two
> dependencies in stable (python3 and python3-uno), a package size of 48.8

Look at the dependencies of python3-uno and then at those of
libreoffice-core.

> kB, and an installed size of 327.0 kB. So I'm understanding the package
> does not depend upon the installation of LibreOffice proper (the
> redoubtable "stack"?).

Indeed not. Those packages are recommended only. (But many people wisely
stick with the default of installing Recommends:).
 
> Perhaps my comprehension is faulty.

"Room for improvement" is how I would put it. :)


root@desktop3:~# apt-get install unoconv
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  fonts-opensymbol libboost-date-time1.62.0 libboost-filesystem1.62.0 libboost-iostreams1.62.0 libboost-system1.62.0
  libclucene-contribs1v5 libclucene-core1v5 libcmis-0.5-5v5 libeot0 libexttextcat-2.0-0 libexttextcat-data libgltf-0.  1-1 libgpgmepp6 libhyphen0 liblangtag-common liblangtag1 libmhash2 libmythes-1.2-0 libneon27-gnutls libodfgen-0.1-1
  liborcus-0.12-0 libpython3.6 libraptor2-0 librasqal3 librdf0 libreoffice-common libreoffice-core libreoffice-style-  galaxy libreoffice-style-tango librevenge-0.0-0 libxmlsec1 libxmlsec1-nss libyajl2 python3-uno uno-libs3 ure
Suggested packages:
  raptor2-utils rasqal-utils librdf-storage-postgresql librdf-storage-mysql librdf-storage-sqlite librdf-storage-virt  uoso redland-utils tango-icon-theme java5-runtime
Recommended packages:
  libreoffice-writer libreoffice-draw libreoffice-calc libreoffice-impress
The following NEW packages will be installed:
  fonts-opensymbol libboost-date-time1.62.0 libboost-filesystem1.62.0 libboost-iostreams1.62.0 libboost-system1.62.0
  libclucene-contribs1v5 libclucene-core1v5 libcmis-0.5-5v5 libeot0 libexttextcat-2.0-0 libexttextcat-data libgltf-0.  1-1 libgpgmepp6 libhyphen0 liblangtag-common liblangtag1 libmhash2 libmythes-1.2-0 libneon27-gnutls libodfgen-0.1-1
  liborcus-0.12-0 libpython3.6 libraptor2-0 librasqal3 librdf0 libreoffice-common libreoffice-core libreoffice-style-  galaxy libreoffice-style-tango librevenge-0.0-0 libxmlsec1 libxmlsec1-nss libyajl2 python3-uno uno-libs3 unoconv ur  e
0 upgraded, 37 newly installed, 0 to remove and 0 not upgraded.
Need to get 67.0 MB of archives.
After this operation, 240 MB of additional disk space will be used.
Do you want to continue? [Y/n]


Note that recommended packages are not being installed. Adding them
with "--install-recommends" raises the bar to 207 MB. My estimate was
conservative.

OTOH, cupsfilter is already on the system. It handles text, image and
Postscript files and, run with "-m application/vnd.cups-pdf", produces
a PDF which is autorotated to make it suitable for normal printing.
Lack of searchable text in a PDF is of no consequence for printing.

-- 
Brian.


Reply to: