| | |
Regarding Coverting multiple images to a single pdf in an applet
![]() |
•
•
Join Date: Nov 2009
Posts: 1
Reputation:
Solved Threads: 0
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
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
- View multiple pages using single file (ASP)
- Convert a DVD image file into multiple CD images (Getting Started and Choosing a Distro)
- write/Read into XML File Using VC++ 6.0 please help me (XML, XSLT and XPATH)
- .NET ASPX worker process locks images referenced by PDF (ASP.NET)
- Multiple images to a single bmp/jpg image (Visual Basic 4 / 5 / 6)
Other Threads in the Java Forum
- Previous Thread: Making a Grid with a picture
- Next Thread: printing in passbook using swing
| Thread Tools | Search this Thread |
911 actionlistener addressbook android api append applet application array arrays automation binary blackberry block bluetooth character chat class client code component consumer csv database desktop developmenthelp eclipse error fractal ftp game givemetehcodez graphics gui html ide image integer j2me j2seprojects japplet java javaarraylist javac javaee javaprojects jni jpanel julia lego linked linux list loops mac map method methods mobile netbeans newbie number objects online oriented panel printf problem program programming project projects properties recursion replaydirector reporting researchinmotion rotatetext rsa scanner se server set singleton sms sort sql string swing test textfields threads time title tree tutorial-sample ubuntu update windows working





