[off-topic] How can I "tumble" output of -sDEVICE=tiffg4 ?

Helge Blischke h.blischke at srz.de
Fri Jul 4 09:02:01 PDT 2008


Kurt Pfeifle wrote:
>>For the pages to be rendered upside down, use
>>---snip---
>><</BeginPage
>>     {pop currentpagedevice/PageSize get aload pop exch pop % page length on stack
>>     1 -1 scale 0 exch translate % flip vertical ans move up by the page hight
>>     }bind
>> >>setpagedevice
>>---snip---
>>You best put this into a file, say, prolog.ps, and insert it just
>>after the -f switch, preceding the TIFF file.
>>
>>Helge
> 
> 
> Thinking about the above code and trying to understand it, methinks that this procedure is not correct.
> 
> What I need is "flip vertically, and then flip horizontally, and then move the image into place again" in order to get a net effect of upside down.
> 
> Flipping only into one direction will just "mirror" it.
> 
> Anyway, thanks for your suggestion. It gives me something to chew on, and to modify to see if it at least starts to work somehow (like, outputing me an empty TIFF page... unlike my other attempts, which changed just nada in the output!)
> 
> Cheers & thanks,
> Kurt

Try the following
---snip---
<</BeginPage
   {pop currentpagedevicd/PageSize get aload pop % page width , page length on the stack
    180 rotate % rotate 180 degrees around the origin (lower left corner)
    translate % shift old origin to upper right corner
   }bind
 >>setpagedevice
---snip---
Note: the "%" and the text behind are comments, you need
not preserve it.

Helge


-- 
Helge Blischke
Softwareentwicklung

H.Blischke at acm.org




More information about the cups mailing list