Hi,

Prakash Dubey <[email protected]> hat am 24. Januar 2013 um 21:32
geschrieben:
> sorry, i forgot to mention that, i have set  the CLASSPATH variable to my
> system to the location of pdfbox-app-1.7.1.jar
But it seems that it doesn't work. What did you do to set the CLASSPATH?
What do you get if you type "set CLASSPATH" on the command line? Did you set
the variable just to the location of the jar or to the jar itself?

BR
Andreas Lehmkühler

> On Thu, Jan 24, 2013 at 12:39 AM, Prakash Dubey
> <[email protected]>wrote:
>
> > Hello Everybody,
> >
> > I am trying to use pdfbox-app-1.7.1.jar. I am taking help from this
> > website (http://www.printmyfolders.com/Home/PDFBox-Tutorial) from where i
> > got first given simple program of creating pdf document. But on compiling
> > java compiler is not able to identify library of pdfbox and giving error.
> >
> > My OS is Windows 7(64 bit) and using jdk6 java compiler with
> > pdfbox-app-1.7.1.jar.
> >
> > The program i am trying to compile
> > is:-------------------------------------------
> >
> > import org.apache.pdfbox.pdmodel.*;
> > import java.io.*;
> >
> > public class BlankPDF {
> >     public static void main(String[] args) {
> >         PDDocument doc = null;
> >         try{
> >             doc = new PDDocument();
> >         } catch (IOException ie){
> >             System.out.println(ie);
> >         }
> >         doc.addPage(new PDPage());
> >         try{
> >             doc.save("Empty PDF.pdf");
> >             doc.close();
> >         } catch (Exception io){
> >             System.out.println(io);
> >         }
> >     }
> > }
> >
> > And the following error is coming on my
> > screen:-------------------------------------------------------------------------------------------------------------------------
> >
> >
> > C:\JavaFiles>javac BlankPDF.java
> > BlankPDF.java:2: package org.apache.pdfbox.pdmodel does not exist
> > import org.apache.pdfbox.pdmodel.*;
> > ^
> > BlankPDF.java:7: cannot find symbol
> > symbol  : class PDDocument
> > location: class BlankPDF
> >         PDDocument doc = null;
> >         ^
> > BlankPDF.java:9: cannot find symbol
> > symbol  : class PDDocument
> > location: class BlankPDF
> >             doc = new PDDocument();
> >                       ^
> > BlankPDF.java:13: cannot find symbol
> > symbol  : class PDPage
> > location: class BlankPDF
> >         doc.addPage(new PDPage());
> >                         ^
> > 4 errors
> >
> > --------------------------------------------------------------------------------------------
> > Sorry if i made some mistake...
> > Thanks in advance....

Reply via email to