Gentoo Archives: gentoo-user

From: Joseph <syscon780@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: can not print pdf w/e-document viewer
Date: Sat, 26 Jan 2013 00:46:05
Message-Id: 20130126004837.GB30871@syscon7.inet
In Reply to: [gentoo-user] Re: can not print pdf w/e-document viewer by nunojsilva@ist.utl.pt
1 On 01/25/13 17:50, Nuno Silva wrote:
2 >> lpr -o media=Letter -o landscape -o number-up=4 -o page-ranges=1-8 -o
3 >> number-up-layout=btlr
4 >>
5 >> I think "-o number-up=4" can not be combine with: "-o page-ranges=1-8"
6 >
7 >Try using something like pdfnup (app-text/pdfjam) to generate an n-up
8 >version of the pdf before sending it to the printer.
9 >
10 >If everything else fails, try rewriting the pdf, either using pdftops
11 >then ps2pdf, or by using ghostscript directly.
12 >
13 >And I don't think you can compare the two things directly: in Windows,
14 >IIRC, the applications print using GDI. lpr sends the PDF as is directly
15 >to the CUPS server. If the PDF lacks builtin fonts, for example, those
16 >won't appear even if your PDF viewer can view them (think, fonts under
17 >your home directory, a printing server in a different machine...).
18 >
19 >Some PDF or PostScript features can hit ghostscript bugs or other
20 >issues.
21 >
22 >But, if you want my two cents, look at psnup and pdfnup. At least then
23 >you can be sure that the 4-per-page part is done. lpr options are
24 >quite simplistic; do also have a look at pdftk if you need, for example
25 >to rotate PDF pages, or to concatenate PDFs without rewriting their
26 >contents (keep the code as-is, unlike what would happen if you just fed
27 >ghostscript several pdfs, where it would rewrite the PDF code).
28 >
29 >
30 >If your issue is with a single PDF, the problem is likely some issue
31 >between a PDF feature used by that PDF and the incarnation of
32 >ghostscript you are using. Try pdftops and ps2pdf and see if the result
33 >is printable.
34 >
35 >--
36 >Nuno Silva (aka njsg)
37 >http://njsg.sdf-eu.org/
38
39 I was able to figure it out.
40 "-o page-ranges=1-8" refers to number of sheets printed not number of pages in a document.
41 so if I 4-pages per sheet, this should be: "-o page-ranges=1-2"
42 and it can be combine with "-o number-up=4"
43
44 --
45 Joseph