| | |
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 |
6 @param actuate android api applet application arc array arrays automation balls binary bluetooth bold business byte c++ chat class client code codesnippet collections compare component coordinates database defaultmethod detection doctype dragging ebook eclipse educational error file fractal froglogic game givemetehcodez graphics gui guitesting helpwithhomework hql html ide ideas image ingres input integer internet intersect invokingapacheantprogrammatically j2me java javaexcel javaprojects jni jpanel jtextarea julia linux list map method methods mobile mysql netbeans newbie nextline parameter php pong problem program programming project recursion recursive scanner sell server set sms sort sql string sun swing swt terminal threads tree web websites windows





