Re: setpagedevice in BeginPageSetup preventing duplex printing, why?
- From: ken <ken@xxxxxxxxxxx>
- Date: Mon, 18 May 2009 17:04:56 +0100
In article <11cf1e2f-fedb-4768-84e2-
e89a121b8b5b@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, hubbahank@xxxxxxxxxxxxxx
says...
i want to duplex printing a document. The document was converted from
PDF to PS with Acrobat.
Do you have a PPD file for your printer ? If so then it should allow
support for duplex at the time you create the PS file.
The document contains, for each page to print, a PageSetup block in
which there is the following statement.
{<</PageSize [595 842] /Policies << /PageSize 1 >> >> setpagedevice}
stopped pop
That requests the interpreter to use Media sized to 595x842 units (72
units to one inch), which is A4. Policy 1 says that if the interpreter
cannot match the requested media (within 5 units) it should ignore the
PageSize request when selecting media. You will get the default media
instead in this case.
things to get a duplexed output. First i tried to insert /Duplex true
in the above statement. I also tried the following as the only
setpagedevice statement in PageSetup.
{<< /Duplex true /Policies << /Duplex 0 >> >> setpagedevice} stopped
pop
But the output remains simplex.
Second i inserted the next right before %%EndSetup
[{
%%BeginFeature: *Duplex
<</Duplex true /Tumble false>> setpagedevice
%%EndFeature
} stopped cleartomark
As long as the setpagedevice statement is in the PageSetup, the output
is simplex. If i comment the setpagedevice statement the output is
duplex.
Without seeing exactly what you've done, it sounds like this is not
expected behaviour. setpagedevice is cumulative, unless you select a
different device using the /OutputDevice key.
However, selecting the page size is the sort of thing which is likely to
reset duplexing. You either need to select both simultaneously, or
select Duplex after selecting the media.
Two questions.
Is there a way to get duplex output with the setpagedevice statement
in PageSetup?
They are both using setpagedevice, so the answer is almost certainly
yes. You could try combining the operations into one, eg:
<</PageSize [595 842] /Policies << /PageSize 1 >> /Duplex true /Tumble
false>> setpagedevice
Does the following code the same as the above setpagedevice statement
in PageSetup, when inserted in the Setup block ?
[{
%%BeginFeature: *PageSize A4
<</PageSize [595 842] /ImagingBBox null /MediaClass null>>
setpagedevice
%%EndFeature
} stopped cleartomark
No, it sets the ImgingBBox to null and alse the MediaClass (which is a
level 3 key affecting media selection) to null. Setting a key to null is
not the same is leaving it untouched, where it may well take on a
default value.
Note that in PostScript anything beginning with a '%' character is a
comment, so you can (generally) ignore thees, they are only there to
give you a hint about what's happening.
Ken
.
- References:
- setpagedevice in BeginPageSetup preventing duplex printing, why?
- From: hubbahank
- setpagedevice in BeginPageSetup preventing duplex printing, why?
- Prev by Date: setpagedevice in BeginPageSetup preventing duplex printing, why?
- Next by Date: Swapping two variables
- Previous by thread: setpagedevice in BeginPageSetup preventing duplex printing, why?
- Next by thread: Swapping two variables
- Index(es):
Relevant Pages
|