• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error while execute using itextpdf5.2.1

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...
 
Rancher
Posts: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:run code where it will be used instead of inside of an IDE

 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Live ordinary life in an extraordinary way. Details embedded in this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic