Hi,

Am 11.06.2008 um 11:46 schrieb R. Bastian:
> Yes, it's grosso modo the same than my script; one must add  
> 'rotated=1':
> to obtain the »querformat« (== 'à l'italienne'). The result is perfect
> on a display, but when printing it, I get losses (?) [Verluste,  
> pertes] due
> to the printer (0.5 cm on the margins).
>
> I tried to change the margins (== reduce the 'Satzspiegel') but it  
> did not work.
> I will try to reduce the content and adapt it to the printable area,  
> if there is
> no other way.

using rotated=1 is probably ok, but I would do the margin manually.  
Note that a simple fittosize will not work, as we do not clip the  
contents. Furthermore most of the time it's preferable to not rescale  
the content at all.

I would try along the following modifications (untested):

def poster(c, paperformat, margin=0):
    bbox = c.bbox()
    margin_pt = unit.topt(margin)
    paperwidth_pt = unit.topt(paperformat.width)
    paperheight_pt = unit.topt(paperformat.height)
    d = document.document()
    for ix in range(int(math.ceil(bbox.width_pt()/ 
(paperwidth_pt-2*margin_pt)))):
        for iy in range(int(math.ceil(bbox.height_pt()/ 
(paperheight_pt-2*margin_pt)))):
            c2 = canvas.canvas()
            c2.insert(c, [trafo.translate_pt(-bbox.llx_pt- 
ix*(paperwidth_pt-2*margin_pt)+margin_pt,
                                             -bbox.lly_pt- 
iy*(paperheight_pt-2*margin_pt)+margin_pt)])
            # you can also add some cut-marks
            c2.stroke(path.rect(margin_pt, margin_pt,  
paperwidth_pt-2*margin_pt, paperheight_pt-2*margin_pt))
            p = document.page(c2, paperformat=paperformat, centered=0)
            d.append(p)
    d.writePDFfile()

HTH,


André


-- 
by  _ _      _    Dr. André Wobst, Amselweg 22, 85716 Unterschleißheim
    / \ \    / )   [EMAIL PROTECTED], http://www.wobsta.de/
   / _ \ \/\/ /    PyX - High quality PostScript and PDF figures
  (_/ \_)_/\_/     with Python & TeX: visit http://pyx.sourceforge.net/


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
PyX-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyx-user

Reply via email to