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 | 16 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 4 of 4 — ← Prev page 1 2 3 [4]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-06 16:30 +0100 |
| Message-ID | <v4YA1-2Xj-1@gated-at.bofh.it> |
| In reply to | #190707 |
On Fri 05 Jan 2018 at 21:06:22 -0600, Jason wrote: > On a RasperryPi with Raspbian, I would like to create a PDF Printer to > print files to. I only know how to do this with the GUI program > system-config-printer but I don't want to install that on this > Pi. What shell command do I need to create a PDF printer on the Pi (or > on any Debian, for that matter)? lpadmin. The wiki should help. -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | Jason <electron@emypeople.net> |
|---|---|
| Date | 2018-01-07 03:50 +0100 |
| Message-ID | <v59c5-1w8-3@gated-at.bofh.it> |
| In reply to | #190718 |
I am grateful for all the suggestions. The reason I would like to setup a PDF printer is so that I can use the lp command to print most of the common file formats that might come as email attachments to the PDF printer to have them all end up in the ~/PDF folder. For example: lp -d PDF-Printer image.jpg This way if there is no physical printer accessible from the Pi, one can just print to the PDF printer and print a hard copy later from the generated PDFs. On Sat, Jan 06, 2018 at 03:28:48PM +0000, Brian wrote: > On Fri 05 Jan 2018 at 21:06:22 -0600, Jason wrote: > > > On a RasperryPi with Raspbian, I would like to create a PDF Printer to > > print files to. I only know how to do this with the GUI program > > system-config-printer but I don't want to install that on this > > Pi. What shell command do I need to create a PDF printer on the Pi (or > > on any Debian, for that matter)? > > lpadmin. The wiki should help. > I had looked into lpadmin and thought that might be what I need but couldn't find in the man page how to add a printer. I don't have web access so am asking here rather than looking on the wiki. So basically what I'm asking is how to add a printer (this could apply to any printer, not just PDF) without needing to install a printer configuration GUI. Thanks. -- Jason
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-07 11:20 +0100 |
| Message-ID | <v5gdz-6gg-1@gated-at.bofh.it> |
| In reply to | #190735 |
On Sat 06 Jan 2018 at 20:45:01 -0600, Jason wrote: > > lpadmin. The wiki should help. > > I had looked into lpadmin and thought that might be what I need but > couldn't find in the man page how to add a printer. I don't have web > access so am asking here rather than looking on the wiki. For a PDF printer: install (or reinstall) printer-driver-cups-pdf. lpadmin automatically sets up a print queue. > So basically what I'm asking is how to add a printer (this could apply > to any printer, not just PDF) without needing to install a printer > configuration GUI. In general: lpadmin -p queue_name -v device_uri -E -m PPD. Obtain device_uri from 'lpinfo -v' and PPD from 'lpinfo -m'. -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | rhkramer@gmail.com |
|---|---|
| Date | 2018-01-07 13:50 +0100 |
| Message-ID | <v5iyJ-7DX-15@gated-at.bofh.it> |
| In reply to | #190740 |
I know this is not directly on point to the OP's question as subsequently clarified, but I would point out that a variety of programs like txt2pdf exist (and work)--I assume, but don't know that they are available in the various Debian distros. On Sunday, January 07, 2018 05:10:50 AM Brian wrote: > On Sat 06 Jan 2018 at 20:45:01 -0600, Jason wrote: > > > lpadmin. The wiki should help. > > > > I had looked into lpadmin and thought that might be what I need but > > couldn't find in the man page how to add a printer. I don't have web > > access so am asking here rather than looking on the wiki. > > For a PDF printer: install (or reinstall) printer-driver-cups-pdf. > lpadmin automatically sets up a print queue. > > > So basically what I'm asking is how to add a printer (this could apply > > to any printer, not just PDF) without needing to install a printer > > configuration GUI. > > In general: lpadmin -p queue_name -v device_uri -E -m PPD. > > Obtain device_uri from 'lpinfo -v' and PPD from 'lpinfo -m'.
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-07 19:20 +0100 |
| Message-ID | <v5nI6-2QW-13@gated-at.bofh.it> |
| In reply to | #190743 |
On Sun 07 Jan 2018 at 07:46:30 -0500, rhkramer@gmail.com wrote: > I know this is not directly on point to the OP's question as subsequently But it does treat conversion of files to PDFs, so you are not way off base. Look at the variety of techniques people use: paps, a2ps, enscript, cupsfilter, ps2pdf, unoconv etc. There probably isn't one tried and trusted method which suits everyone; and we haven't exhausted discussion of them all and how they could fit into a printing system. > clarified, but I would point out that a variety of programs like txt2pdf exist > (and work)--I assume, but don't know that they are available in the various > Debian distros. Which txt2pdf? I tried the DFSG free one at https://github.com/baruchel/txt2pdf Not in Debian, AFAICT, but download, put in /usr/local/bin and install python-reportlab. Gives searchable PDFs, fonts can be selected more easily than with cupsfilter or cups-pdf and it has UTF-8 support. Looks useful. -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | rhkramer@gmail.com |
|---|---|
| Date | 2018-01-07 21:30 +0100 |
| Message-ID | <v5pJU-4cG-13@gated-at.bofh.it> |
| In reply to | #190757 |
On Sunday, January 07, 2018 01:15:06 PM Brian wrote: > On Sun 07 Jan 2018 at 07:46:30 -0500, rhkramer@gmail.com wrote: > > clarified, but I would point out that a variety of programs like txt2pdf > > exist (and work)--I assume, but don't know that they are available in > > the various Debian distros. > > Which txt2pdf? Sorry, I don't remember--it must have been on a machine prior to my current one (with Wheezy) as I don't see it--the prior machine was Lenny, iirc (Debain 5.n). But my statement about variety of programs was more intended to say that there are programs like txt2pdf, pdf2txt, html2txt (iirce)--in other words, such programs to convert between a variety of formats. > I tried the DFSG free one at > > https://github.com/baruchel/txt2pdf > > Not in Debian, AFAICT, but download, put in /usr/local/bin and install > python-reportlab. Gives searchable PDFs, fonts can be selected more > easily than with cupsfilter or cups-pdf and it has UTF-8 support. Looks > useful.
[toc] | [prev] | [next] | [standalone]
| From | rhkramer@gmail.com |
|---|---|
| Date | 2018-01-08 13:30 +0100 |
| Message-ID | <v5EIW-5I9-7@gated-at.bofh.it> |
| In reply to | #190766 |
On Sunday, January 07, 2018 03:28:25 PM rhkramer@gmail.com wrote: > But my statement about variety of programs was more intended to say that > there are programs like txt2pdf, pdf2txt, html2txt (iirce)--in other > words, such programs to convert between a variety of formats. For the sake of (an attempt at) completeness, there are also some similar programs that use "to" instead of "2", e.g., pdftotext. (I don't know if there is a texttopdf (or txttopdf).
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-08 20:00 +0100 |
| Message-ID | <v5KOl-1ch-5@gated-at.bofh.it> |
| In reply to | #190797 |
On Mon 08 Jan 2018 at 07:21:46 -0500, rhkramer@gmail.com wrote: > On Sunday, January 07, 2018 03:28:25 PM rhkramer@gmail.com wrote: > > But my statement about variety of programs was more intended to say that > > there are programs like txt2pdf, pdf2txt, html2txt (iirce)--in other > > words, such programs to convert between a variety of formats. > > For the sake of (an attempt at) completeness, there are also some similar > programs that use "to" instead of "2", e.g., pdftotext. (I don't know if > there is a texttopdf (or txttopdf). The ones with "2" are from the ghostscript package. "to" is either from poppler or cups or cups-filters. -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | rhkramer@gmail.com |
|---|---|
| Date | 2018-01-08 20:20 +0100 |
| Message-ID | <v5L7I-1yE-11@gated-at.bofh.it> |
| In reply to | #190816 |
Thanks! On Monday, January 08, 2018 01:55:50 PM Brian wrote: > The ones with "2" are from the ghostscript package. "to" is either from > poppler or cups or cups-filters.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2018-01-08 04:20 +0100 |
| Message-ID | <v5w8F-hi-1@gated-at.bofh.it> |
| In reply to | #190757 |
On Sun 07 Jan 2018 at 18:15:06 (+0000), Brian wrote: > On Sun 07 Jan 2018 at 07:46:30 -0500, rhkramer@gmail.com wrote: > > > I know this is not directly on point to the OP's question as subsequently > > But it does treat conversion of files to PDFs, so you are not way off > base. Look at the variety of techniques people use: paps, a2ps, > enscript, cupsfilter, ps2pdf, unoconv etc. There probably isn't one > tried and trusted method which suits everyone; and we haven't exhausted > discussion of them all and how they could fit into a printing system. > > > clarified, but I would point out that a variety of programs like txt2pdf exist > > (and work)--I assume, but don't know that they are available in the various > > Debian distros. > > Which txt2pdf? I tried the DFSG free one at > > https://github.com/baruchel/txt2pdf > > Not in Debian, AFAICT, but download, put in /usr/local/bin and install > python-reportlab. Gives searchable PDFs, fonts can be selected more > easily than with cupsfilter or cups-pdf and it has UTF-8 support. Looks > useful. Indeed. It seems a lot faster than paps+ps2pdf too. I can see myself using this, though I'll keep my paps function as well, as it appears to be able to make substitutions for missing glyphs. It's handy to have a function that prints *something* at every position (except the strip at 0x80), with those little blobs containing 4 hex chars where there's no glyph. paps also does columns. The default fault in txt2pdf is Courier→Nimbus Mono AFAICT, which is very limited. The unifont TTF font has far more characters, but the quality is very poor (deliberately, but looks like a bitmapped font). I also haven't figured out line-numbering: I'll have to study the script. Searchability is a useful extra (I'm used to just searching the original text source file). BTW a2ps, suggested earlier, is another that failed to move to Unicode AIUI. A shame as it had lots of useful column/custom heading stuff. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Curt <curty@free.fr> |
|---|---|
| Date | 2018-01-08 10:40 +0100 |
| Message-ID | <v5C4p-40D-7@gated-at.bofh.it> |
| In reply to | #190782 |
On 2018-01-08, David Wright <deblis@lionunicorn.co.uk> wrote:
>>
>> Which txt2pdf? I tried the DFSG free one at
>>
>> https://github.com/baruchel/txt2pdf
>>
>> Not in Debian, AFAICT, but download, put in /usr/local/bin and install
>> python-reportlab. Gives searchable PDFs, fonts can be selected more
>> easily than with cupsfilter or cups-pdf and it has UTF-8 support. Looks
>> useful.
>
> Indeed. It seems a lot faster than paps+ps2pdf too. I can see myself
> using this, though I'll keep my paps function as well, as it appears
> to be able to make substitutions for missing glyphs. It's handy to
> have a function that prints *something* at every position (except
> the strip at 0x80), with those little blobs containing 4 hex chars
> where there's no glyph. paps also does columns.
>
> The default fault in txt2pdf is Courier→Nimbus Mono AFAICT, which is
> very limited. The unifont TTF font has far more characters, but
> the quality is very poor (deliberately, but looks like a bitmapped font).
> I also haven't figured out line-numbering: I'll have to study the script.
> Searchability is a useful extra (I'm used to just searching the original
> text source file).
It seems very swift. I tried line-numbering with the '--line-numbers'
argument, but got no line numbers (which is not what I was expecting).
Then I tried the '--page-numbers' argument, expecting to see page
numbers (and I did, centered at the bottom).
You can change the default font ('--font' or '-f' <full-path-to-ttf>,
but I'm sure you know that already).
> BTW a2ps, suggested earlier, is another that failed to move to Unicode
> AIUI. A shame as it had lots of useful column/custom heading stuff.
>
> Cheers,
> David.
>
>
--
"An autobiography is only to be trusted when it reveals something disgraceful.
A man who gives a good account of himself is probably lying, since any life
when viewed from the inside is simply a series of defeats."
— George Orwell
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-08 19:20 +0100 |
| Message-ID | <v5KbD-Yr-1@gated-at.bofh.it> |
| In reply to | #190786 |
On Mon 08 Jan 2018 at 09:35:36 +0000, Curt wrote:
> On 2018-01-08, David Wright <deblis@lionunicorn.co.uk> wrote:
> >>
> >> Which txt2pdf? I tried the DFSG free one at
> >>
> >> https://github.com/baruchel/txt2pdf
> >>
> >> Not in Debian, AFAICT, but download, put in /usr/local/bin and install
> >> python-reportlab. Gives searchable PDFs, fonts can be selected more
> >> easily than with cupsfilter or cups-pdf and it has UTF-8 support. Looks
> >> useful.
> >
> > Indeed. It seems a lot faster than paps+ps2pdf too. I can see myself
> > using this, though I'll keep my paps function as well, as it appears
> > to be able to make substitutions for missing glyphs. It's handy to
> > have a function that prints *something* at every position (except
> > the strip at 0x80), with those little blobs containing 4 hex chars
> > where there's no glyph. paps also does columns.
> >
> > The default fault in txt2pdf is Courier→Nimbus Mono AFAICT, which is
> > very limited. The unifont TTF font has far more characters, but
> > the quality is very poor (deliberately, but looks like a bitmapped font).
> > I also haven't figured out line-numbering: I'll have to study the script.
> > Searchability is a useful extra (I'm used to just searching the original
> > text source file).
>
> It seems very swift. I tried line-numbering with the '--line-numbers'
> argument, but got no line numbers (which is not what I was expecting).
A possible bug. Not to worry; preprocess:
pr -n text.txt
> Then I tried the '--page-numbers' argument, expecting to see page
> numbers (and I did, centered at the bottom).
Ditto.
> You can change the default font ('--font' or '-f' <full-path-to-ttf>,
> but I'm sure you know that already).
Unlike David Wright, I've not noticed the font quality to be poor when
the magnification ability (left click with the mouse) of gv is used to
examine characters in the PDF.
--
Brian.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2018-01-09 02:30 +0100 |
| Message-ID | <v5QTL-5pK-3@gated-at.bofh.it> |
| In reply to | #190814 |
On Mon 08 Jan 2018 at 18:18:33 (+0000), Brian wrote:
> On Mon 08 Jan 2018 at 09:35:36 +0000, Curt wrote:
>
> > On 2018-01-08, David Wright <deblis@lionunicorn.co.uk> wrote:
> > >>
> > >> Which txt2pdf? I tried the DFSG free one at
> > >>
> > >> https://github.com/baruchel/txt2pdf
> > >>
> > >> Not in Debian, AFAICT, but download, put in /usr/local/bin and install
> > >> python-reportlab. Gives searchable PDFs, fonts can be selected more
> > >> easily than with cupsfilter or cups-pdf and it has UTF-8 support. Looks
> > >> useful.
> > >
> > > Indeed. It seems a lot faster than paps+ps2pdf too. I can see myself
> > > using this, though I'll keep my paps function as well, as it appears
> > > to be able to make substitutions for missing glyphs. It's handy to
> > > have a function that prints *something* at every position (except
> > > the strip at 0x80), with those little blobs containing 4 hex chars
> > > where there's no glyph. paps also does columns.
> > >
> > > The default fault in txt2pdf is Courier→Nimbus Mono AFAICT, which is
> > > very limited.
default.png attached¹. The majority of Unicode characters appear as
unadorned blobs.
> > > The unifont TTF font has far more characters, but
> > > the quality is very poor (deliberately, but looks like a bitmapped font).
unifont-ttf.png attached. AIUI the entire BMP (Basic Multilingual
Plane) is contained in less than 4MB and illustrated in a 2MB .BMP
(DIB) file, so the quality is, as I said, deliberately poor. Try
$ display /usr/share/fonts/opentype/unifont/unifont.ttf
> > > I also haven't figured out line-numbering: I'll have to study the script.
> > > Searchability is a useful extra (I'm used to just searching the original
> > > text source file).
> >
> > It seems very swift. I tried line-numbering with the '--line-numbers'
> > argument, but got no line numbers (which is not what I was expecting).
>
> A possible bug. Not to worry; preprocess:
>
> pr -n text.txt
>
> > Then I tried the '--page-numbers' argument, expecting to see page
> > numbers (and I did, centered at the bottom).
>
> Ditto.
>
> > You can change the default font ('--font' or '-f' <full-path-to-ttf>,
> > but I'm sure you know that already).
>
> Unlike David Wright, I've not noticed the font quality to be poor when
> the magnification ability (left click with the mouse) of gv is used to
> examine characters in the PDF.
What I was using with paps (and its maximum Unicode coverage when
diagnostic printing) is FreeMono, which appears to substitute unifont
characters where it needs to: freemono.png attached. This shows the
font itself, some hex blobs, and some unifont substitutions.
So *most* of a typical file will be printed with the quality of
$ display /usr/share/fonts/opentype/freefont/FreeMono.otf
Commenting on your other post, yes, it *would* be nice if paps were
papdf, but I merely have | ps2pdf - - at the end of the bash
function that sets the default font and margins etc to suit my
printer. So being Unicode-aware is far more important to me than
PS output.
¹ attachments are scrot screenshots of xpdf set to 600%, which limits
their crispness.
Cheers,
David.
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-10 01:40 +0100 |
| Message-ID | <v6cAW-2MJ-11@gated-at.bofh.it> |
| In reply to | #190823 |
On Mon 08 Jan 2018 at 19:21:39 -0600, David Wright wrote:
> On Mon 08 Jan 2018 at 18:18:33 (+0000), Brian wrote:
> >
> > Unlike David Wright, I've not noticed the font quality to be poor when
> > the magnification ability (left click with the mouse) of gv is used to
> > examine characters in the PDF.
>
> What I was using with paps (and its maximum Unicode coverage when
> diagnostic printing) is FreeMono, which appears to substitute unifont
> characters where it needs to: freemono.png attached. This shows the
> font itself, some hex blobs, and some unifont substitutions.
> So *most* of a typical file will be printed with the quality of
> $ display /usr/share/fonts/opentype/freefont/FreeMono.otf
>
> Commenting on your other post, yes, it *would* be nice if paps were
> papdf, but I merely have | ps2pdf - - at the end of the bash
> function that sets the default font and margins etc to suit my
> printer. So being Unicode-aware is far more important to me than
> PS output.
>
> ¹ attachments are scrot screenshots of xpdf set to 600%, which limits
> their crispness.
I am not attempting to dissuade anyone from using paps but trying to
explore why what appears to be a relatively simple process (text to PDF)
has so few utilities. Without a UTF-8 requirement we are awash with
Postscript programs, but not so with direct conversion to PDF. Having
said that, I have no deep understanding of either the PostScript or PDF
format, so perhaps it is more difficult than I imagine; especially when
it comes to producing an output with, for example, columns, headers etc.
However, there are utilities which can help with preprocessing a text
file beforehand.
As a UTF-8 Debian alternative to txt2pdf:
Create $HOME/.config/fontconfig/fonts.conf with the contents
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<alias>
<family>monospace</family>
<prefer>
<family>freemono</family>
</prefer>
</alias>
</fontconfig>
(Is there anything better than FreeMono's UTF-8 glyph coverage?)
Then
CHARSET=utf-8 /usr/lib/cups/filter/texttopdf 1 1 1 1 1 < text.txt> > out.pdf
out.pdf is not searchable, so continue with
pdftocairo -pdf out.pdf searchable.pdf
A bonus is that searchable.pdf is about seven times smaller than out.pdf.
--
Brian.
[toc] | [prev] | [next] | [standalone]
| From | Brian <ad44@cityscape.co.uk> |
|---|---|
| Date | 2018-01-08 20:20 +0100 |
| Message-ID | <v5L7H-1yE-3@gated-at.bofh.it> |
| In reply to | #190782 |
On Sun 07 Jan 2018 at 21:18:09 -0600, David Wright wrote: > BTW a2ps, suggested earlier, is another that failed to move to Unicode > AIUI. A shame as it had lots of useful column/custom heading stuff. a2ps. enscript and (possibly) paps date from the era (not so long ago) when PostScript was COW (centre of the world). That is not to say they have outlived their usfulness (yet) but things have moved on to PDF. In particular, PDF is a pivotol aspect of the default printing system, as well as many printers sold today. It also seems to be the common way of distributing documents. -- Brian.
[toc] | [prev] | [next] | [standalone]
| From | Jason <electron@emypeople.net> |
|---|---|
| Date | 2018-01-09 04:20 +0100 |
| Subject | [SOLVED]Re: How to create a PDF-Printer from the command line |
| Message-ID | <v5SCd-6IN-3@gated-at.bofh.it> |
| In reply to | #190740 |
On Sun, Jan 07, 2018 at 10:10:50AM +0000, Brian wrote: > On Sat 06 Jan 2018 at 20:45:01 -0600, Jason wrote: > > > > lpadmin. The wiki should help. > > > > I had looked into lpadmin and thought that might be what I need but > > couldn't find in the man page how to add a printer. I don't have web > > access so am asking here rather than looking on the wiki. > > For a PDF printer: install (or reinstall) printer-driver-cups-pdf. > lpadmin automatically sets up a print queue. That's what I needed, thanks. > > > So basically what I'm asking is how to add a printer (this could apply > > to any printer, not just PDF) without needing to install a printer > > configuration GUI. > > In general: lpadmin -p queue_name -v device_uri -E -m PPD. > > Obtain device_uri from 'lpinfo -v' and PPD from 'lpinfo -m'. > Also useful information, I saved this for future reference. The possibilities for file conversion mentioned in this thread were interesting to me, too. I may use some of the other ideas at some point in the future. Thank you Brian, and everyone else. -- Jason
[toc] | [prev] | [standalone]
Page 4 of 4 — ← Prev page 1 2 3 [4]
Back to top | Article view | linux.debian.user
csiph-web