Home > Archive > PostScript > April 2006 > 2-up printing, CUPS and Re: FontHasEuro and psutils ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
2-up printing, CUPS and Re: FontHasEuro and psutils ?
|
|
| LC's NoSpam Newsreading account 2006-03-28, 4:01 am |
| On Thu, 23 Mar 2006, Michael Sweet wrote:
> LC's NoSpam Newsreading account wrote:
[color=darkred]
> This is a common problem with psutils - it breaks DSC conformance of
> the print files...
I thought it was the other way round (psutils performed correctly on DSC
compliant files and might fail on non-conformant ones). My input files
comes from some Windows stuff and is obviously non-conformant (e.g. gv
does not see page numbers)
> Since you're using SuSE, you're probably using CUPS, so just use
> the "number-up" option:
>
> lpr -o number-up=2 filename.ps
Thank you for reminding me of that option. I believe I read of it in the
manual and even tried it once but was not working. Now (installation of
CUPS was recently rearranged institute-wise) 2-up printing with CUPS
works ... but ...
- the specific offending file (which prints perfectly if left alone)
generates the FontHasEuro error EVEN with CUPS (i.e. CUPS 2-up
option and psutils behave in the same way !)
- for other well behaved files (e.g. LaTeX generated postscript) I
obtain the same results with
psnup -2 infile.ps | lpr
lpr -o number-up=2 infile.ps
the former is what I used to do in the past (on single-face
printers). Now that I have access to double face printers this is
slightly inconvenient :
the front page of a sheet displays two pages as follows
pag 1 top on the left page 2 top on the right
to bottom of pag 1 to bottom of pag 2
the back page of the same sheet has pag. 3 on the back of
pag 1, pag. 4 of the back of pag. 2, printed upside down.
I.e. to read my document I have to take the bottom long side
of the sheet and turn it up.
- what I'd prefer would be to be able to read the document taking
the right hand short side of the sheet, and turn it to the left
i.e. pag. 3 will be on the back of pag. 2 and pag. 4 on the
back of pag. 1 and with the same orientation
I can achieve this via the psutils
psnup -2 infile.ps | pstops '2:0,1U@1(21cm,29.70cm)' | lpr
Is there a way to achieve the same directly via CUPS options ?
The CUPS manual lists the following 8 possibilities
* -o number-up-layout=btlr; Bottom to top, left to right
* -o number-up-layout=btrl; Bottom to top, right to left
* -o number-up-layout=lrbt; Left to right, bottom to top
* -o number-up-layout=lrtb; Left to right, top to bottom (default)
* -o number-up-layout=rlbt; Right to left, bottom to top
* -o number-up-layout=rltb; Right to left, top to bottom
* -o number-up-layout=tblr; Top to bottom, left to right
* -o number-up-layout=tbrl; Top to bottom, right to left
but there is no further explanation nor a figure, so I would not
waste paper trying each option in turn. IS one of them doing what
I want ? And if yes, which one ?
--
----------------------------------------------------------------------
nospam@mi.iasf.cnr.it is a newsreading account used by more persons to
avoid unwanted spam. Any mail returning to this address will be rejected.
Users can disclose their e-mail address in the article if they wish so.
| |
| Helge Blischke 2006-03-28, 7:01 pm |
| LC's NoSpam Newsreading account wrote:
>
> On Thu, 23 Mar 2006, Michael Sweet wrote:
>
>
>
> I thought it was the other way round (psutils performed correctly on DSC
> compliant files and might fail on non-conformant ones). My input files
> comes from some Windows stuff and is obviously non-conformant (e.g. gv
> does not see page numbers)
>
>
> Thank you for reminding me of that option. I believe I read of it in the
> manual and even tried it once but was not working. Now (installation of
> CUPS was recently rearranged institute-wise) 2-up printing with CUPS
> works ... but ...
>
> - the specific offending file (which prints perfectly if left alone)
> generates the FontHasEuro error EVEN with CUPS (i.e. CUPS 2-up
> option and psutils behave in the same way !)
>
> - for other well behaved files (e.g. LaTeX generated postscript) I
> obtain the same results with
>
> psnup -2 infile.ps | lpr
> lpr -o number-up=2 infile.ps
>
> the former is what I used to do in the past (on single-face
> printers). Now that I have access to double face printers this is
> slightly inconvenient :
>
> the front page of a sheet displays two pages as follows
>
> pag 1 top on the left page 2 top on the right
> to bottom of pag 1 to bottom of pag 2
>
> the back page of the same sheet has pag. 3 on the back of
> pag 1, pag. 4 of the back of pag. 2, printed upside down.
>
> I.e. to read my document I have to take the bottom long side
> of the sheet and turn it up.
>
> - what I'd prefer would be to be able to read the document taking
> the right hand short side of the sheet, and turn it to the left
>
> i.e. pag. 3 will be on the back of pag. 2 and pag. 4 on the
> back of pag. 1 and with the same orientation
>
> I can achieve this via the psutils
>
> psnup -2 infile.ps | pstops '2:0,1U@1(21cm,29.70cm)' | lpr
>
> Is there a way to achieve the same directly via CUPS options ?
> The CUPS manual lists the following 8 possibilities
>
> * -o number-up-layout=btlr; Bottom to top, left to right
> * -o number-up-layout=btrl; Bottom to top, right to left
> * -o number-up-layout=lrbt; Left to right, bottom to top
> * -o number-up-layout=lrtb; Left to right, top to bottom (default)
> * -o number-up-layout=rlbt; Right to left, bottom to top
> * -o number-up-layout=rltb; Right to left, top to bottom
> * -o number-up-layout=tblr; Top to bottom, left to right
> * -o number-up-layout=tbrl; Top to bottom, right to left
>
> but there is no further explanation nor a figure, so I would not
> waste paper trying each option in turn. IS one of them doing what
> I want ? And if yes, which one ?
>
Could you please post an URL to a sample file which shows this weird behaviour?
Helge
--
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de
| |
| LC's NoSpam Newsreading account 2006-03-29, 4:03 am |
| On Tue, 28 Mar 2006, Helge Blischke wrote:
[color=darkred]
[color=darkred]
[color=darkred]
> Could you please post an URL to a sample file which shows this weird
> behaviour?
I have only one file, which I received from a colleague, and was
generated outside of my control. You can retrieve it from
http://sax.iasf-milano.inaf.it/~luc...ample/review.ps
To prevent robots accessing it, there is a password protection (username
and password are both the word "temporary")
--
----------------------------------------------------------------------
nospam@mi.iasf.cnr.it is a newsreading account used by more persons to
avoid unwanted spam. Any mail returning to this address will be rejected.
Users can disclose their e-mail address in the article if they wish so.
| |
|
| LC's NoSpam Newsreading account wrote:
> ...
>
>
> ...
> I have only one file, which I received from a colleague, and was
> generated outside of my control. You can retrieve it from
> http://sax.iasf-milano.inaf.it/~luc...ample/review.ps
> ...
The file is DSC-compliant, but its pages are NOT independent. This is
clearly indicated by the "%%PageOrder: Special" in the header. This
means you cannot process the file with tools that assume independent
pages.
(OT note: Many people consider that DSC-compliant implies independent
pages. I don't. Page independence is highly reccomended, but the even
existance of "%%PageOrder: Special" shows it is not an absolute
requirement.)
Further examination of the file shows that it loads procsets and fonts
inside pages, procsets and fonts which are needed by subsequent pages.
psutils adds an extra level of save/ restore around each page, so
resources and fonts loaded inside one page are lost as soon as that
page ends, and so unavailable for next pages.
I would first "normalize" the file first, for example going the
PS->PDF->PS way, to get a DSC-conformant PS file WITH independent
pages, and only then do the N-up.
| |
| Helge Blischke 2006-03-29, 8:00 am |
| SaGS wrote:
>
> LC's NoSpam Newsreading account wrote:
>
> The file is DSC-compliant, but its pages are NOT independent. This is
> clearly indicated by the "%%PageOrder: Special" in the header. This
> means you cannot process the file with tools that assume independent
> pages.
>
> (OT note: Many people consider that DSC-compliant implies independent
> pages. I don't. Page independence is highly reccomended, but the even
> existance of "%%PageOrder: Special" shows it is not an absolute
> requirement.)
>
> Further examination of the file shows that it loads procsets and fonts
> inside pages, procsets and fonts which are needed by subsequent pages.
> psutils adds an extra level of save/ restore around each page, so
> resources and fonts loaded inside one page are lost as soon as that
> page ends, and so unavailable for next pages.
>
> I would first "normalize" the file first, for example going the
> PS->PDF->PS way, to get a DSC-conformant PS file WITH independent
> pages, and only then do the N-up.
This behaviour is common default for Windows PS drivers. To get page independent
PS jobs, you need to select "optimize for portability" or "page independece"
(or what the preferences dialogs offer; depending on the make and version of the
printer driver the text may differ) in your printer instance preferences.
Helge
PS: To get page independent PS jobs afterwards, you could try the latest version
of Ghostscript (using the pswrite device; the older ones convert glyphs to bitmaps),
or you could tra PStill by Frank M. Siegert, but the output of that is not
fully DSC compliant and needs some postprocessing.
--
Helge Blischke
Softwareentwicklung
SRZ Berlin | Firmengruppe besscom
http://www.srz.de
| |
| Horst Kiehl 2006-04-06, 7:02 pm |
| LC's NoSpam Newsreading account <nospam@mi.iasf.cnr.it> writes:
> On Thu, 23 Mar 2006, Michael Sweet wrote:
>
> Thank you for reminding me of that option.
> ... but ...
> I.e. to read my document I have to take the bottom long side
> of the sheet and turn it up.
>
> - what I'd prefer would be to be able to read the document taking
> the right hand short side of the sheet, and turn it to the left
You want
-o sides=two-sided-short-edge
instead of
-o sides=two-sided-short-edge
(which may be the default on your printer).
Horst
| |
| Horst Kiehl 2006-04-06, 7:02 pm |
| LC's NoSpam Newsreading account <nospam@mi.iasf.cnr.it> writes:
> On Thu, 23 Mar 2006, Michael Sweet wrote:
>
> Thank you for reminding me of that option.
> ... but ...
> I.e. to read my document I have to take the bottom long side
> of the sheet and turn it up.
>
> - what I'd prefer would be to be able to read the document taking
> the right hand short side of the sheet, and turn it to the left
You want
-o sides=two-sided-short-edge
instead of
-o sides=two-sided-long-edge
(which may be the default on your printer).
Horst
|
|
|
|
|