944,078 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 329
  • Java RSS
Nov 3rd, 2009
0

Regarding Coverting multiple images to a single pdf in an applet

Expand Post »
Hi Everybody,
I have an issue converting images from an image panel to a pdf .I am able to convert a single image to a pdf file but not multiple images.Can anyone help me in this. Below is the code which iam using now
public void send(String fn){
BufferedImage oldimage=image;
try{

File dir;

File home = new File(System.getProperty("user.home"));
dir = new File(home,"My Documents");
if(!dir.exists()){ dir = home;}
File file = new File(dir,fn+".pdf");file.delete();
System.out.println(file.getCanonicalPath());
ImageIO.write(getImage(), "pdf", file);

}catch(Exception e){
System.out.println("9\b"+getClass().getName()+"\n\t.send:\n\t"+e.getMessage());
image=oldimage;
e.printStackTrace();
}catch(OutOfMemoryError e){
System.out.println("9\b"+getClass().getName()+"\n\t.send:\n\t"+e.getMessage());
image=oldimage;
}
}
Thanks,
venkat
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
gouredyyvenkat is offline Offline
1 posts
since Nov 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Making a Grid with a picture
Next Thread in Java Forum Timeline: printing in passbook using swing





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC