pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prakash Dubey <prakashdube...@gmail.com>
Subject java compiler is not able to find pdfbox-app-1.7.1.jar file
Date Wed, 23 Jan 2013 19:09:15 GMT
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....

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message