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 › Complex PDF output
Page Index Toggle Pages: 1
Complex PDF output (Read 273 times)
Complex PDF output
Jun 29th, 2006, 7:13pm
 
hi everyone,
i've been playing around with the pdf-lib the last couple of days trying to produce a large image (126cm wide) for print. As my output grows more complex (naturally) the pdf takes more time to finish.
at some point it starts to take so much time, that i'm not sure if it's still working or not. therefore i've written some code to benchmark the pdf-lib on my machine:

import processing.pdf.*;

float stepsize=15;

size(900,600,PDF,"benchmark_"+hour()+second()+".pdf");
background(255);
strokeWeight(stepsize/20);
stroke(100,0,0,100);
noFill();

int gc=0;
for(float y=0;y<600;y=y+stepsize){
 for(float x=0;x<900;x=x+stepsize){
   ellipse(x,y,stepsize*0.75,stepsize*0.75);
   gc++;
   println(gc);
 }
}
println("d o n e ! !");
exit();


using this code i'm able to produce a pdf containing 60,000 ellipses (stepsize=3) in reasonable time. if i set stepsize to 2 (=135,000 ellipses) the pdf just "stays" at 0kb, even if i wait for more then half an hour. no error messages and i also tried this: http://processing.org/faq/bugs.html#memory

so i guess my questions are:
-) is there some kind of limit how much you can draw into a pdf?
-) or is there at least a way to know if the pdf is still worked upon?
-) has somebody a recommendation how to output large(10mb+) vector graphics?

thanks in advance,
daniel

(btw: i'm on win xp pro sp2, 3ghz pentium4, 1g ram -if this is of some sort of importance...)

Page Index Toggle Pages: 1