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 & HelpOther Libraries › PDF Library and Eclipse PApplet
Page Index Toggle Pages: 1
PDF Library and Eclipse PApplet (Read 777 times)
PDF Library and Eclipse PApplet
Aug 18th, 2009, 12:18am
 
I am trying to get the PDF library to work in a PApplet that is integrated into a Java project but I keep getting an error.

Quote:
Error while running applet.
java.lang.RuntimeException: public PGraphicsPDF(int width, int height, PApplet parent, String filename) does not exist.
     at processing.core.PApplet.createGraphics(PApplet.java:1152)
     at processing.core.PApplet.createGraphics(PApplet.java:1036)
     at processing.core.PApplet.beginRecord(PApplet.java:7092)


Here is my code:
Quote:
 public void setup() {
   size(400, 400);
   noLoop();
   beginRecord(PDF, "test.pdf");
 }
 
 public void draw() {
   background(192, 64, 0);
   stroke(255);
   line(150, 25, 270, 350);
   
   endRecord();
 }


I added the pdf.jar and itext.jar files to my project to no avail. Any help or guidance on this problem would be greatly appreciated!

Ryan
Re: PDF Library and Eclipse PApplet
Reply #1 - Aug 18th, 2009, 2:24am
 
What is PDF? Out of PDE context, I think it should be PConstants.PDF.
Page Index Toggle Pages: 1