Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error while execute using itextpdf5.2.1

 
Bhavin Sukhadiya
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Bhavin Sukhadiya
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No i am not typing anything in command line...cz i am executing this code by eclips...
 
Bhavin Sukhadiya
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, it seems you're trying to run PdfContentReaderTool, and not your own code.
 
Bhavin Sukhadiya
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ya. you right...But what can i do for now...its urgent for me...Please help me...
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:run code where it will be used instead of inside of an IDE
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18218
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic