This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Error while execute using itextpdf5.2.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Error while execute using itextpdf5.2.1" Watch "Error while execute using itextpdf5.2.1" New topic
Author

Error while execute using itextpdf5.2.1

Bhavin Sukhadiya
Greenhorn

Joined: Apr 25, 2014
Posts: 5
Hello Everyone...

I am getting this error "PdfContentReaderTool <pdf file> [<output file>|stdout] [<page num>]"

My script is converting image to pdf...i am using itextpdf 5.2.1.jar...
Below my code....



Where this argument coming from different class String image_path1,String image_path2,String job_path,String name

Please help me...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42374
    
  64
Welcome to JavaRanch.

I am getting this error "PdfContentReaderTool <pdf file> [<output file>|stdout] [<page num>]"

You would most likely get this if you run the PdfContentReaderTool without passing in the required parameters on the command lines. What, exactly, are you typing in?

What's the connection between this error message and the code you posted?


Ping & DNS - my free Android networking tools app
Bhavin Sukhadiya
Greenhorn

Joined: Apr 25, 2014
Posts: 5
No i am not typing anything in command line...cz i am executing this code by eclips...
Bhavin Sukhadiya
Greenhorn

Joined: Apr 25, 2014
Posts: 5
Thank you for reply...Ulf Dittmer....

My this code of another class is calling the generate_pdf class...

if(check_file_top.exists() || check_file_bot.exists()) {
new Generate_PDF(job.path()+"\\pcb_view_top.png",job.path()
+"\\pcb_view_bot.png",job.path(),job.name());
}
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42374
    
  64
Well, it seems you're trying to run PdfContentReaderTool, and not your own code.
Bhavin Sukhadiya
Greenhorn

Joined: Apr 25, 2014
Posts: 5
I am running my whole workplace project...if it run sucessful...thn i wil use this script in UCAM...its CAD work ide for PCB(Printed circuit Board)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42374
    
  64
Well, we don't really know what you're doing, so it's hard to advise. That's why I generally tell people to run code where it will be used instead of inside of an IDE. From the command line for desktop apps, or inside a standalone servlet container for web apps.
Bhavin Sukhadiya
Greenhorn

Joined: Apr 25, 2014
Posts: 5
Ya. you right...But what can i do for now...its urgent for me...Please help me...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42374
    
  64
Ulf Dittmer wrote:run code where it will be used instead of inside of an IDE
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16160
    
  21

From the looks of it, you are invoking the iText processor that READs a PDF and write it out in some other format. And what I think you probably wanted to do was WRITE a PDF.

I recommend that you go back and look at the iText API docs.

I also would recommend that your processing class be set up to accept a file as an argument instead of making up the file from OS-dependent components. For one thing, a webapp works better if you create the file with mktempfile.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error while execute using itextpdf5.2.1