From: Michael J G. <mic...@us...> - 2020-05-07 13:44:52
|
Hi Marten, I guess you did not quite follow through the thread you cited. the following should be as close to your code as possible but working :) from pyx import * c = canvas.canvas() c.text(0, 0, "Hello, world!") c.stroke(path.line(0, 0, 2, 0)) page = document.page(c, paperformat = document.paperformat.Letter) result = document.document([page,]) result.writePSfile("Whatever") Cheers Michael Am Do., 7. Mai 2020 um 15:02 Uhr schrieb Maarten van der Velde <m.h...@gm...>: > > Dear all, > > I wonder if you can help me. > > I would like to create multi page documents in Pyx. I am browsing through the documentation and the mailing list archive, but I am not able to connect all the pieces of information. > > I have tried following along: > > https://sourceforge.net/p/pyx/mailman/message/6193313/ > > c = canvas.canvas() > c.text(0, 0, "Hello, world!") > c.stroke(path.line(0, 0, 2, 0)) > > page = document.page(c, paperformat=paperformat.Letter) > > result = canvas.document(c) > result.writePSfile("Whatever") > > But this gives me the error: > > AttributeError: 'Document' object has no attribute ‘page' > > Did the package change since this thread? (2007…) Is there a working example somewhere that I could use instead? > > Thanks, > > Maarten > _______________________________________________ > PyX-user mailing list > PyX...@li... > https://lists.sourceforge.net/lists/listinfo/pyx-user |