Re: [xep-support] Postscript output and page defaults (setpagedevice)

From: Nikolai Grigoriev (grig@renderx.com)
Date: Thu Nov 14 2002 - 06:47:32 PST


Hi Peter,

Thank you for posting the problem. It is indeed a weak point
in the current XEP version.

> Looking at the generated postscript I find the following (or
> simailar) at the beginning of each page:
>
> %%Page: 1 1
> %%BeginPageSetup
> <<
> /PageOffset [0 0]
> /Margins [ 0 0 ]
> /PageSize [595.276 841.89]
> /ManualFeed false
> /Duplex false
> /MirrorPrint false
> /NegativePrint false
> /Collate false
> /NumCopies 1
> >> setpagedevice
> %%EndPageSetup
>
> The question I have is why does the generated postscript need to
> have many of the attributes in the above code including:
> /ManualFeed, /Duplex and maybe even /Collate and /NumCopies

That's true. We indeed insert a call to setpagedevice in the PageSetup
section for each page. There is no strong intent to do it - we just didn't
realise it may hinder anything. After a closer look, I agree that
setpagedevice is out of place, and too restrictive.

We will do our best to correct this for the next maintenance
release. In a meanwhile, I suggest a quick, albeit not very clean,
solution: just filter out all %%BeginPageSetup/%%EndPageSetup
sections by passing XEP's output, e.g through a perl script like this:

#!/usr/bin/perl -w

my $inside = 0;
while (<STDIN>) {
  if ($inside) { $inside = !/^%%EndPageSetup/; }
  else { /^%%BeginPageSetup/ ? $inside = 1 : print $_; }
}

>From my insider's position, I can guarantee that no other code
but setpagedevice may happen inside page setup DSC section.

Best regards,
Nikolai Grigoriev
RenderX

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



This archive was generated by hypermail 2.1.5 : Wed Dec 18 2002 - 08:41:28 PST