We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › working with the pdf-library
Page Index Toggle Pages: 1
working with the pdf-library (Read 503 times)
working with the pdf-library
Feb 20th, 2006, 5:30pm
 
I'm trying to make a pdf which catches what is written outside the main-window, and i found this, but i can't seem to call on the "document" variable in the PGraphicsPDF.

How can i find those globals defined in the PGraphicsPDF class

-seltar
Re: working with the pdf-library
Reply #1 - Feb 20th, 2006, 6:38pm
 
1. do "sketch -> add file" twice, first on PGraphicsPDF.java, then on itext.jar from the libraries/pdf. or just drag each file to the sketch editing window to do this automatically.

2. remove the package designation in PGraphicsPDF, and give it a new class name, but keep the tab name ending with .java, ie MessyPDF.java

3. now hack away with pdf it as you please. size(500, 500, "MessyPDF", "output.pdf") or whatever.

there are two things at work, one is that itext will clip things by default to the main area, so removing the crop area in illustrator will sometimes reveal overlapping bits. sometimes it also clips out to reduce file size if it's off screen. but these may be things that you can shut off. personally it sounds like a mess and that you might instead want to just scale() your sketch smaller so that everything is included, then clip later.
Page Index Toggle Pages: 1