Regarding Coverting multiple images to a single pdf in an applet

Reply

Join Date: Nov 2009
Posts: 1
Reputation: gouredyyvenkat is an unknown quantity at this point 
Solved Threads: 0
gouredyyvenkat gouredyyvenkat is offline Offline
Newbie Poster

Regarding Coverting multiple images to a single pdf in an applet

 
0
  #1
24 Days Ago
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
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC