Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #190707 > unrolled thread
| Started by | Jason <electron@emypeople.net> |
|---|---|
| First post | 2018-01-06 04:20 +0100 |
| Last post | 2018-01-09 04:20 +0100 |
| Articles | 20 on this page of 76 — 15 participants |
Back to article view | Back to linux.debian.user
How to create a PDF-Printer from the command line Jason <electron@emypeople.net> - 2018-01-06 04:20 +0100
Re: How to create a PDF-Printer from the command line Gene Heskett <gheskett@shentel.net> - 2018-01-06 05:50 +0100
Re: How to create a PDF-Printer from the command line john doe <johndoe65534@mail.com> - 2018-01-06 06:00 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-06 21:20 +0100
Re: How to create a PDF-Printer from the command line john doe <johndoe65534@mail.com> - 2018-01-06 22:00 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-07 21:10 +0100
Re: How to create a PDF-Printer from the command line john doe <johndoe65534@mail.com> - 2018-01-07 21:50 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-07 22:00 +0100
Re: How to create a PDF-Printer from the command line john doe <johndoe65534@mail.com> - 2018-01-08 11:50 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-08 12:30 +0100
Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-06 22:10 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-07 01:20 +0100
Re: How to create a PDF-Printer from the command line Erik Christiansen <dvalin@internode.on.net> - 2018-01-07 03:30 +0100
Re: How to create a PDF-Printer from the command line Erik Christiansen <dvalin@internode.on.net> - 2018-01-07 03:50 +0100
Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-07 12:10 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-07 13:40 +0100
Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-07 17:10 +0100
Re: How to create a PDF-Printer from the command line davidson <davidson@freevolt.org> - 2018-01-09 07:30 +0100
Re: How to create a PDF-Printer from the command line Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> - 2018-01-09 10:30 +0100
Re: How to create a PDF-Printer from the command line <tomas@tuxteam.de> - 2018-01-09 10:40 +0100
Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-09 11:30 +0100
Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-09 14:10 +0100
Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-09 14:40 +0100
Re: How to create a PDF-Printer from the command line Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> - 2018-01-09 16:10 +0100
Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-09 16:40 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-09 20:20 +0100
Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-09 20:50 +0100
Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-09 21:10 +0100
Re: How to create a PDF-Printer from the command line <tomas@tuxteam.de> - 2018-01-09 23:30 +0100
Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-10 00:10 +0100
Re: How to create a PDF-Printer from the command line <tomas@tuxteam.de> - 2018-01-10 00:50 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-09 21:40 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-09 21:50 +0100
Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-09 22:00 +0100
Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-09 23:40 +0100
Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-10 10:10 +0100
Re: How to create a PDF-Printer from the command line <tomas@tuxteam.de> - 2018-01-10 10:50 +0100
Re: How to create a PDF-Printer from the command line Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> - 2018-01-10 14:20 +0100
Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-10 16:40 +0100
Re: How to create a PDF-Printer from the command line <tomas@tuxteam.de> - 2018-01-10 17:20 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-10 20:20 +0100
Re: How to create a PDF-Printer from the command line <tomas@tuxteam.de> - 2018-01-10 21:10 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-17 19:30 +0100
Re: How to create a PDF-Printer from the command line <tomas@tuxteam.de> - 2018-01-17 21:10 +0100
Re: How to create a PDF-Printer from the command line Joel Wirāmu Pauling <joel@aenertia.net> - 2018-01-17 22:20 +0100
Re: How to create a PDF-Printer from the command line Joel Wirāmu Pauling <joel@aenertia.net> - 2018-01-17 22:40 +0100
Re: How to create a PDF-Printer from the command line Chris Ramsden <chris.ramsden@gmail.com> - 2018-01-17 22:50 +0100
Re: How to create a PDF-Printer from the command line Dan Ritter <dsr@randomstring.org> - 2018-01-17 23:10 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-18 00:00 +0100
Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-18 10:50 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-18 13:50 +0100
Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-18 17:00 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-18 20:20 +0100
Re: How to create a PDF-Printer from the command line Ben Caradoc-Davies <ben@transient.nz> - 2018-01-17 22:50 +0100
Re: How to create a PDF-Printer from the command line Ben Caradoc-Davies <ben@transient.nz> - 2018-01-17 22:40 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-18 00:00 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-17 23:50 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-10 11:40 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-10 20:30 +0100
Re: How to create a PDF-Printer from the command line Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> - 2018-01-09 15:00 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-06 16:30 +0100
Re: How to create a PDF-Printer from the command line Jason <electron@emypeople.net> - 2018-01-07 03:50 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-07 11:20 +0100
Re: How to create a PDF-Printer from the command line rhkramer@gmail.com - 2018-01-07 13:50 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-07 19:20 +0100
Re: How to create a PDF-Printer from the command line rhkramer@gmail.com - 2018-01-07 21:30 +0100
Re: How to create a PDF-Printer from the command line rhkramer@gmail.com - 2018-01-08 13:30 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-08 20:00 +0100
Re: How to create a PDF-Printer from the command line rhkramer@gmail.com - 2018-01-08 20:20 +0100
Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-08 04:20 +0100
Re: How to create a PDF-Printer from the command line Curt <curty@free.fr> - 2018-01-08 10:40 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-08 19:20 +0100
Re: How to create a PDF-Printer from the command line David Wright <deblis@lionunicorn.co.uk> - 2018-01-09 02:30 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-10 01:40 +0100
Re: How to create a PDF-Printer from the command line Brian <ad44@cityscape.co.uk> - 2018-01-08 20:20 +0100
[SOLVED]Re: How to create a PDF-Printer from the command line Jason <electron@emypeople.net> - 2018-01-09 04:20 +0100
Page 3 of 4 — ← Prev page 1 2 [3] 4 Next page →
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-10 20:20 +0100 |
| Message-ID | <v6u4N-6l8-5@gated-at.bofh.it> |
| In reply to | #190902 |
On Wed 10 Jan 2018 at 17:13:09 +0100, tomas@tuxteam.de wrote: > On Wed, Jan 10, 2018 at 09:38:47AM -0600, David Wright wrote: > > And to be fair, results can be pretty exciting, depending on the > actual file content... > > I would go with a2ps, too, btw. > > Downside is that it does the panoramic tour via PS and thus generates > fairly hefty PDFs. With plain text files as an input? brian@desktop3:~$ a2ps /etc/mime.types -o output1.ps [/etc/mime.types (plain): 15 pages on 8 sheets] [Total: 15 pages on 8 sheets] saved into the file `output1.ps' [73 lines wrapped] brian@desktop3:~$ ps2pdf output1.ps brian@desktop3:~$ txt2pdf.py /etc/mime.types -f /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf -o output2.pdf Writing '/etc/mime.types' with 80 characters per line and 60 lines per page... PDF document: 14 pages brian@desktop3:~$ /usr/sbin/cupsfilter /etc/mime.types > output3.pdf brian@desktop3:~$ ls -l -rw-r--r-- 1 brian brian 28853 Jan 10 18:58 output1.pdf -rw-r--r-- 1 brian brian 66557 Jan 10 18:58 output1.ps -rw-r--r-- 1 brian brian 36221 Jan 10 18:58 output2.pdf -rw-r--r-- 1 brian brian 219186 Jan 10 18:59 output3.pdf output3.pdf contains the complete DejaVuSansMono glyph set. The finger is often pointed at ps2pdf as a file bloating command. Unjustifiably, it would seem, in this case. A counter example with a text file? -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2018-01-10 21:10 +0100 |
| Message-ID | <v6uRb-74W-3@gated-at.bofh.it> |
| In reply to | #190905 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, Jan 10, 2018 at 07:10:03PM +0000, Brian wrote: > On Wed 10 Jan 2018 at 17:13:09 +0100, tomas@tuxteam.de wrote: [...] > > Downside is that it does the panoramic tour via PS and thus generates > > fairly hefty PDFs. > > With plain text files as an input? [...] > brian@desktop3:~$ ls -l > -rw-r--r-- 1 brian brian 28853 Jan 10 18:58 output1.pdf > -rw-r--r-- 1 brian brian 66557 Jan 10 18:58 output1.ps > -rw-r--r-- 1 brian brian 36221 Jan 10 18:58 output2.pdf > -rw-r--r-- 1 brian brian 219186 Jan 10 18:59 output3.pdf > > output3.pdf contains the complete DejaVuSansMono glyph set. > > The finger is often pointed at ps2pdf as a file bloating command. > Unjustifiably, it would seem, in this case. A counter example with a > text file? Thanks for actually trying out. I stand corrected... Cheers - -- t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlpWcQkACgkQBcgs9XrR2kZ3tQCeM637S9JsPZ2AKPdGokY2cfX/ HzAAn3w+4RrmUSSTAWlbeTreu7S+nUVI =2Q9W -----END PGP SIGNATURE-----
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-17 19:30 +0100 |
| Message-ID | <v90Dg-2Gp-13@gated-at.bofh.it> |
| In reply to | #190907 |
On Wed 10 Jan 2018 at 21:01:13 +0100, tomas@tuxteam.de wrote: > On Wed, Jan 10, 2018 at 07:10:03PM +0000, Brian wrote: > > On Wed 10 Jan 2018 at 17:13:09 +0100, tomas@tuxteam.de wrote: > > [...] > > > > Downside is that it does the panoramic tour via PS and thus generates > > > fairly hefty PDFs. > > > > With plain text files as an input? > > [...] > > > brian@desktop3:~$ ls -l > > -rw-r--r-- 1 brian brian 28853 Jan 10 18:58 output1.pdf > > -rw-r--r-- 1 brian brian 66557 Jan 10 18:58 output1.ps > > -rw-r--r-- 1 brian brian 36221 Jan 10 18:58 output2.pdf > > -rw-r--r-- 1 brian brian 219186 Jan 10 18:59 output3.pdf > > > > output3.pdf contains the complete DejaVuSansMono glyph set. > > > > The finger is often pointed at ps2pdf as a file bloating command. > > Unjustifiably, it would seem, in this case. A counter example with a > > text file? > > Thanks for actually trying out. I stand corrected... A gracious response. However, my data were in the context of using a2ps to go from text to PS. Your "hefty PDFs" would be entirely correct if paps had been used for the conversion. The result is a 156551 sized file for me. gs2pdf comes up with a whopping 11540827 and takes 18 s to do so. An explantation is given by a Ghostscript developer at https://stackoverflow.com/questions/26066535/ps2pdf-creates-a-very-big-pdf-file-from-paps-created-ps-file The same page has > As the author of paps,...I have just released a new version of paps... The new version's README has > paps is a command line program for converting Unicode text > encoded in UTF-8 to postscript and pdf by using pango. That was in 2015, Debian's paps does not relect the existence of a 7.0 version. I wonder why? -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | <tomas@tuxteam.de> |
|---|---|
| Date | 2018-01-17 21:10 +0100 |
| Message-ID | <v92c1-3MU-7@gated-at.bofh.it> |
| In reply to | #191231 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, Jan 17, 2018 at 06:21:31PM +0000, Brian wrote: > On Wed 10 Jan 2018 at 21:01:13 +0100, tomas@tuxteam.de wrote: [...] > > Thanks for actually trying out. I stand corrected... > > A gracious response. However, my data were in the context of using a2ps > to go from text to PS. Your "hefty PDFs" would be entirely correct if > paps had been used for the conversion. The result is a 156551 sized file > for me. gs2pdf comes up with a whopping 11540827 and takes 18 s to do so. Heh. I've been called all sort of names, but gracious... :-) > That was in 2015, Debian's paps does not relect the existence of a > 7.0 version. I wonder why? Yes, that might be the root of my dim memories. Thanks for your thorough investigation cheers - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlpfrDMACgkQBcgs9XrR2kYFGACeL5J7MFpQSDa3F96kHNjq6D7H DFMAn0w5jLhnXV492+EJQeORz3LhQqoX =t1V6 -----END PGP SIGNATURE-----
[toc] | [prev] | [next] | [standalone]
| From | Joel Wirāmu Pauling <joel@aenertia.net> |
|---|---|
| Date | 2018-01-17 22:20 +0100 |
| Message-ID | <v93hM-4tb-21@gated-at.bofh.it> |
| In reply to | #191235 |
[Multipart message — attachments visible in raw view] — view raw
**cough** $convert imagemagick $convert somefile.whatever somefile.pdf --- On 18 January 2018 at 09:04, <tomas@tuxteam.de> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Wed, Jan 17, 2018 at 06:21:31PM +0000, Brian wrote: > > On Wed 10 Jan 2018 at 21:01:13 +0100, tomas@tuxteam.de wrote: > > [...] > > > > Thanks for actually trying out. I stand corrected... > > > > A gracious response. However, my data were in the context of using a2ps > > to go from text to PS. Your "hefty PDFs" would be entirely correct if > > paps had been used for the conversion. The result is a 156551 sized file > > for me. gs2pdf comes up with a whopping 11540827 and takes 18 s to do so. > > Heh. I've been called all sort of names, but gracious... :-) > > > That was in 2015, Debian's paps does not relect the existence of a > > 7.0 version. I wonder why? > > Yes, that might be the root of my dim memories. > > Thanks for your thorough investigation > > cheers > - -- tomás > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.12 (GNU/Linux) > > iEYEARECAAYFAlpfrDMACgkQBcgs9XrR2kYFGACeL5J7MFpQSDa3F96kHNjq6D7H > DFMAn0w5jLhnXV492+EJQeORz3LhQqoX > =t1V6 > -----END PGP SIGNATURE----- > >
[toc] | [prev] | [next] | [standalone]
| From | Joel Wirāmu Pauling <joel@aenertia.net> |
|---|---|
| Date | 2018-01-17 22:40 +0100 |
| Message-ID | <v93B8-4zG-19@gated-at.bofh.it> |
| In reply to | #191237 |
[Multipart message — attachments visible in raw view] — view raw
Works fine for txt, although as it rasterizes things it's not going to be optimized for size. On 18 January 2018 at 10:33, Ben Caradoc-Davies <ben@transient.nz> wrote: > On 18/01/18 10:15, Joel Wirāmu Pauling wrote: > >> **cough** $convert >> imagemagick >> $convert somefile.whatever somefile.pdf >> > > +1 for ImageMagick convert to generate PDFs from scanned pages (images). I > found that this works best with -page and -density specified. However, I > have not tried using it for text, which I think was the problem facing the > original poster. > > Kind regards, > > -- > Ben Caradoc-Davies <ben@transient.nz> > Director > Transient Software Limited <https://transient.nz/> > New Zealand > >
[toc] | [prev] | [next] | [standalone]
| From | Chris Ramsden <chris.ramsden@gmail.com> |
|---|---|
| Date | 2018-01-17 22:50 +0100 |
| Message-ID | <v93KN-4D5-3@gated-at.bofh.it> |
| In reply to | #191238 |
On 17/01/18 21:42, Ben Caradoc-Davies wrote: > On 18/01/18 10:37, Joel Wirāmu Pauling wrote: >> Works fine for txt, although as it rasterizes things it's not going to be >> optimized for size. > > Yes, typically, but for large fonts and low resolution outputs with few pages, rasterised pages may be smaller. > > Kind regards, > If I feed it a text file, it gives me an error: convert: improper image header `self_spam.txt' @ error/txt.c/ReadTXTImage/439. What's the trick to making it work with a text file as input? -- Chris
[toc] | [prev] | [next] | [standalone]
| From | Dan Ritter <dsr@randomstring.org> |
|---|---|
| Date | 2018-01-17 23:10 +0100 |
| Message-ID | <v944a-50y-9@gated-at.bofh.it> |
| In reply to | #191241 |
On Wed, Jan 17, 2018 at 09:47:01PM +0000, Chris Ramsden wrote: > On 17/01/18 21:42, Ben Caradoc-Davies wrote: > > On 18/01/18 10:37, Joel Wirāmu Pauling wrote: > >> Works fine for txt, although as it rasterizes things it's not going to be > >> optimized for size. > > > > Yes, typically, but for large fonts and low resolution outputs with few pages, rasterised pages may be smaller. > > > > Kind regards, > > > If I feed it a text file, it gives me an error: > > convert: improper image header `self_spam.txt' @ error/txt.c/ReadTXTImage/439. > > What's the trick to making it work with a text file as input? Use pandoc instead. -dsr-
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-18 00:00 +0100 |
| Message-ID | <v94Qy-5iv-11@gated-at.bofh.it> |
| In reply to | #191244 |
On Wed 17 Jan 2018 at 17:06:26 -0500, Dan Ritter wrote: > On Wed, Jan 17, 2018 at 09:47:01PM +0000, Chris Ramsden wrote: > > On 17/01/18 21:42, Ben Caradoc-Davies wrote: > > > On 18/01/18 10:37, Joel Wirāmu Pauling wrote: > > >> Works fine for txt, although as it rasterizes things it's not going to be > > >> optimized for size. > > > > > > Yes, typically, but for large fonts and low resolution outputs with few pages, rasterised pages may be smaller. > > > > > > Kind regards, > > > > > If I feed it a text file, it gives me an error: > > > > convert: improper image header `self_spam.txt' @ error/txt.c/ReadTXTImage/439. > > > > What's the trick to making it work with a text file as input? > > Use pandoc instead. I'd like to nominate this response as the most useless of 2018. "it" obviously refers to the imagemagick convert utility. -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | Curt <curty@free.fr> |
|---|---|
| Date | 2018-01-18 10:50 +0100 |
| Message-ID | <v9eZz-3Iw-3@gated-at.bofh.it> |
| In reply to | #191241 |
On 2018-01-17, Chris Ramsden <chris.ramsden@gmail.com> wrote: > On 17/01/18 21:42, Ben Caradoc-Davies wrote: >> On 18/01/18 10:37, Joel Wirāmu Pauling wrote: >>> Works fine for txt, although as it rasterizes things it's not going to be >>> optimized for size. >> >> Yes, typically, but for large fonts and low resolution outputs with few pages, rasterised pages may be smaller. >> >> Kind regards, >> > If I feed it a text file, it gives me an error: > > convert: improper image header `self_spam.txt' @ error/txt.c/ReadTXTImage/439. > > What's the trick to making it work with a text file as input? I ran into the same error (fixed in later versions, apparently, though I am in the dark as to what version you are using and how late is later). I read an explicit convert text:mytext.txt mytext.pdf works. But it doesn't work here. Also: all roads lead to Rome, but some may be more suitable for wagons than others. -- “True terror is to wake up one morning and discover that your high school class is running the country.” – Kurt Vonnegut
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-18 13:50 +0100 |
| Message-ID | <v9hNL-5HD-11@gated-at.bofh.it> |
| In reply to | #191257 |
On Thu 18 Jan 2018 at 09:44:51 +0000, Curt wrote: > On 2018-01-17, Chris Ramsden <chris.ramsden@gmail.com> wrote: > > On 17/01/18 21:42, Ben Caradoc-Davies wrote: > >> On 18/01/18 10:37, Joel Wirāmu Pauling wrote: > >>> Works fine for txt, although as it rasterizes things it's not going to be > >>> optimized for size. > >> > >> Yes, typically, but for large fonts and low resolution outputs with few pages, rasterised pages may be smaller. > >> > >> Kind regards, > >> > > If I feed it a text file, it gives me an error: > > > > convert: improper image header `self_spam.txt' @ error/txt.c/ReadTXTImage/439. > > > > What's the trick to making it work with a text file as input? > > I ran into the same error (fixed in later versions, apparently, though I > am in the dark as to what version you are using and how late is later). > > I read an explicit > > convert text:mytext.txt mytext.pdf > > works. > > But it doesn't work here. > > Also: all roads lead to Rome, but some may be more suitable for wagons than others. As is obvious, I hadn't realised imagemagick converted text to pdf. However, the command you give works for me on stable and unstable. It gives unsearchable PDFs. -- Brian
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2018-01-18 17:00 +0100 |
| Message-ID | <v9kLE-7y5-5@gated-at.bofh.it> |
| In reply to | #191262 |
On Thu 18 Jan 2018 at 12:40:10 (+0000), Brian wrote: > On Thu 18 Jan 2018 at 09:44:51 +0000, Curt wrote: > > > On 2018-01-17, Chris Ramsden <chris.ramsden@gmail.com> wrote: > > > On 17/01/18 21:42, Ben Caradoc-Davies wrote: > > >> On 18/01/18 10:37, Joel Wirāmu Pauling wrote: > > >>> Works fine for txt, although as it rasterizes things it's not going to be > > >>> optimized for size. > > >> > > >> Yes, typically, but for large fonts and low resolution outputs with few pages, rasterised pages may be smaller. > > >> > > >> Kind regards, > > >> > > > If I feed it a text file, it gives me an error: > > > > > > convert: improper image header `self_spam.txt' @ error/txt.c/ReadTXTImage/439. > > > > > > What's the trick to making it work with a text file as input? > > > > I ran into the same error (fixed in later versions, apparently, though I > > am in the dark as to what version you are using and how late is later). > > > > I read an explicit > > > > convert text:mytext.txt mytext.pdf > > > > works. > > > > But it doesn't work here. > > > > Also: all roads lead to Rome, but some may be more suitable for wagons than others. > > As is obvious, I hadn't realised imagemagick converted text to pdf. > However, the command you give works for me on stable and unstable. > It gives unsearchable PDFs. It serves more as a reminder of convert's way of specifying the contents of the file than much else. Adding -font unicode also dredges up the awful-looking ttf font. But given that the PDF produced is so blurry, that font is probably no worse looking than any other. The PDF is unsearchable because it's really just an image wrapped in a PDF container (like the output from some scanners). Being an image, there's no concept of wrapping long lines either. I can't really be bothered to figure out what's missing on those systems of mine that say: $ convert -font unifont text:/etc/default/grub /tmp/grubby.pdf convert: not authorized `/etc/default/grub' @ error/constitute.c/ReadImage/412. convert: no images defined `/tmp/grubby.pdf' @ error/convert.c/ConvertImageCommand/3210. $ Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-18 20:20 +0100 |
| Message-ID | <v9nTb-1fa-3@gated-at.bofh.it> |
| In reply to | #191271 |
On Thu 18 Jan 2018 at 09:55:28 -0600, David Wright wrote: > On Thu 18 Jan 2018 at 12:40:10 (+0000), Brian wrote: > > On Thu 18 Jan 2018 at 09:44:51 +0000, Curt wrote: > > > > > On 2018-01-17, Chris Ramsden <chris.ramsden@gmail.com> wrote: > > > > On 17/01/18 21:42, Ben Caradoc-Davies wrote: > > > >> On 18/01/18 10:37, Joel Wirāmu Pauling wrote: > > > >>> Works fine for txt, although as it rasterizes things it's not going to be > > > >>> optimized for size. > > > >> > > > >> Yes, typically, but for large fonts and low resolution outputs with few pages, rasterised pages may be smaller. > > > >> > > > >> Kind regards, > > > >> > > > > If I feed it a text file, it gives me an error: > > > > > > > > convert: improper image header `self_spam.txt' @ error/txt.c/ReadTXTImage/439. > > > > > > > > What's the trick to making it work with a text file as input? > > > > > > I ran into the same error (fixed in later versions, apparently, though I > > > am in the dark as to what version you are using and how late is later). > > > > > > I read an explicit > > > > > > convert text:mytext.txt mytext.pdf > > > > > > works. > > > > > > But it doesn't work here. > > > > > > Also: all roads lead to Rome, but some may be more suitable for wagons than others. > > > > As is obvious, I hadn't realised imagemagick converted text to pdf. > > However, the command you give works for me on stable and unstable. > > It gives unsearchable PDFs. > > It serves more as a reminder of convert's way of specifying the > contents of the file than much else. Adding -font unicode also dredges > up the awful-looking ttf font. But given that the PDF produced is so > blurry, that font is probably no worse looking than any other. > > The PDF is unsearchable because it's really just an image wrapped in > a PDF container (like the output from some scanners). Being an image, > there's no concept of wrapping long lines either. Two strikes. > I can't really be bothered to figure out what's missing on those > systems of mine that say: > > $ convert -font unifont text:/etc/default/grub /tmp/grubby.pdf > convert: not authorized `/etc/default/grub' @ error/constitute.c/ReadImage/412. > convert: no images defined `/tmp/grubby.pdf' @ error/convert.c/ConvertImageCommand/3210. I used FreeMono, with the full path to the font. Looks resonable until it is blown up and the bitmapped nature of the PDF shows up clearly, Strike three. I can accept that imagemagick is excellent for processing images (not that I have done much of that with it) but, for producing a quality PDF from text, it has been crossed off my list. -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | Ben Caradoc-Davies <ben@transient.nz> |
|---|---|
| Date | 2018-01-17 22:50 +0100 |
| Message-ID | <v93KN-4D5-5@gated-at.bofh.it> |
| In reply to | #191238 |
On 18/01/18 10:37, Joel Wirāmu Pauling wrote: > Works fine for txt, although as it rasterizes things it's not going to be > optimized for size. Yes, typically, but for large fonts and low resolution outputs with few pages, rasterised pages may be smaller. Kind regards, -- Ben Caradoc-Davies <ben@transient.nz> Director Transient Software Limited <https://transient.nz/> New Zealand
[toc] | [prev] | [next] | [standalone]
| From | Ben Caradoc-Davies <ben@transient.nz> |
|---|---|
| Date | 2018-01-17 22:40 +0100 |
| Message-ID | <v93B8-4zG-21@gated-at.bofh.it> |
| In reply to | #191237 |
On 18/01/18 10:15, Joel Wirāmu Pauling wrote: > **cough** $convert > imagemagick > $convert somefile.whatever somefile.pdf +1 for ImageMagick convert to generate PDFs from scanned pages (images). I found that this works best with -page and -density specified. However, I have not tried using it for text, which I think was the problem facing the original poster. Kind regards, -- Ben Caradoc-Davies <ben@transient.nz> Director Transient Software Limited <https://transient.nz/> New Zealand
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-18 00:00 +0100 |
| Message-ID | <v94Qy-5iv-3@gated-at.bofh.it> |
| In reply to | #191237 |
On Thu 18 Jan 2018 at 10:15:45 +1300, Joel Wirāmu Pauling wrote: > **cough** $convert > > imagemagick > > $convert somefile.whatever somefile.pdf **splutter, splutter**. convert(1) convert - convert between image formats Plain text is an image format? One lives and learns. -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-17 23:50 +0100 |
| Message-ID | <v94GR-5ec-1@gated-at.bofh.it> |
| In reply to | #191235 |
On Wed 17 Jan 2018 at 21:04:03 +0100, tomas@tuxteam.de wrote: > On Wed, Jan 17, 2018 at 06:21:31PM +0000, Brian wrote: > > On Wed 10 Jan 2018 at 21:01:13 +0100, tomas@tuxteam.de wrote: > > [...] > > > > Thanks for actually trying out. I stand corrected... > > > > A gracious response. However, my data were in the context of using a2ps > > to go from text to PS. Your "hefty PDFs" would be entirely correct if > > paps had been used for the conversion. The result is a 156551 sized file > > for me. gs2pdf comes up with a whopping 11540827 and takes 18 s to do so. > > Heh. I've been called all sort of names, but gracious... :-) > > > That was in 2015, Debian's paps does not relect the existence of a > > 7.0 version. I wonder why? > > Yes, that might be the root of my dim memories. > > Thanks for your thorough investigation Anyone can take part. Supporting data is always an advantage, Anyway, I think I'll abandon my flirtation with paps and return to something more suitable for efficiently converting text to a searchable PDF. -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-10 11:40 +0100 |
| Message-ID | <v6lXz-np-13@gated-at.bofh.it> |
| In reply to | #190874 |
On Wed 10 Jan 2018 at 09:02:08 +0000, Curt wrote: > On 2018-01-09, David Wright <deblis@lionunicorn.co.uk> wrote: [...] > > And that's without discussing whether having to install a TeX system > > is any better than installing LibreOffice. > > Yes, I know, you're all flying to the moon in 1969 and must fit > everything into a kilobyte or two. > > But I did foresee this objection with my Gorilla-microbe metaphor, > although I needn't have done so as I was not the one to make the original > suggestion of latex for the production of pdfs in the first place. Given a willingness to devote the necessary resources to the task, a decent case can be made for using unoconv to convert text (and other document types) to PDF. The method relies on starting unoconv as a listener in the background (unconv -l &). X is not required. Quite a sophistcated conversion engine can be constructed; text, MS Word, ODT. RTF etc to PDF. Printing to a real printer or to file can also be built into the system. I sometimes wonder whether this is used as the basis for some of the online conversion services. Simplicity, txt2pdf et al, can be an advantage but having multiple methods at hand cannot be bad. -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-10 20:30 +0100 |
| Message-ID | <v6uet-6uD-3@gated-at.bofh.it> |
| In reply to | #190880 |
On Wed 10 Jan 2018 at 10:31:14 +0000, Brian wrote: > On Wed 10 Jan 2018 at 09:02:08 +0000, Curt wrote: > > > On 2018-01-09, David Wright <deblis@lionunicorn.co.uk> wrote: > > [...] > > > > And that's without discussing whether having to install a TeX system > > > is any better than installing LibreOffice. > > > > Yes, I know, you're all flying to the moon in 1969 and must fit > > everything into a kilobyte or two. > > > > But I did foresee this objection with my Gorilla-microbe metaphor, > > although I needn't have done so as I was not the one to make the original > > suggestion of latex for the production of pdfs in the first place. > > Given a willingness to devote the necessary resources to the task, a > decent case can be made for using unoconv to convert text (and other > document types) to PDF. The method relies on starting unoconv as a > listener in the background (unconv -l &). X is not required. > > Quite a sophistcated conversion engine can be constructed; text, MS > Word, ODT. RTF etc to PDF. Printing to a real printer or to file can > also be built into the system. I sometimes wonder whether this is > used as the basis for some of the online conversion services. > > Simplicity, txt2pdf et al, can be an advantage but having multiple > methods at hand cannot be bad. Another plus for unoconv is that it will process a text file to produce a PDF/A compliant file. If Latex was not completely out of the running, it is now. (Whether or not it is regarded, irrelevantly, as text). -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> |
|---|---|
| Date | 2018-01-09 15:00 +0100 |
| Message-ID | <v62BA-4Ji-3@gated-at.bofh.it> |
| In reply to | #190840 |
On 9-01-2018, at 13h 06'44", Curt wrote about "Re: How to create a PDF-Printer from the command line" > On 2018-01-09, Curt <curty@free.fr> wrote: > > On 2018-01-09, Ionel Mugurel Ciobîcă <I.M.Ciobica@upcmail.nl> wrote: > >> On 9-01-2018, at 06h 52'16", davidson wrote about "Re: How to create a PDF-Printer from the command line" > >>> > > >>> >How does one convert a text file to a PDF using the command line? > >>> > >>> Step 1. Make sure the text file is also a latex document. > >>> Step 2. Use latex. > >> > >> Assuming step 1 is reached, step 2 will make a dvi file. That was not > >> what the OP asked for... > > > > pdftex (your one step road to a pdf)? > > > If you're dealing with latex files, as I have taken some minutes to > discover (cough), you need 'pdflatex', not pdftex, which will barf > immediately upon encountering latex commands. > I use LaTeX since 1997, so I know about this. Dealing with step 1, if a text document is properly formated one can use txt2html to generate a html file which then can be converted further directly into LaTeX with gnuhtml2latex, or into ps (with html2ps), pdf (with wkhtmltopdf), etc. I did not use any of the above, so I can't say how good they work. Converting text to pdf is something I did many times. In the past I used enscript and a2ps. Then I experimented with u2ps and cedilla. I use lately paps (with --font="Freemono 12") for a good UTF-8 coverage. Of course I go via postscript, but that is not so bad. In a single go, a pdf printer may still be the only option. Ionel
[toc] | [prev] | [next] | [standalone]
Page 3 of 4 — ← Prev page 1 2 [3] 4 Next page →
Back to top | Article view | linux.debian.user
csiph-web