File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
Writing Image onto a WordDoc
Joined: Oct 28, 2009
Jun 15, 2011 23:43:28
How Do I write an Image using Java Code on a WordDoc.
I tried using the
BufferedImage bi = ImageIO.read(url); File outputfile = new File("C:\\saved.doc"); ImageIO.write(bi, "png", outputfile);
The file is being created but the image is not being displayed, instead a garbage output is being shown.
Joined: Mar 22, 2005
Jun 15, 2011 23:57:18
Word files have a structured format that you can't write using just the java.io classes. You need to use a library like Apache POI.
Ping & DNS
- my free Android networking tools app
I agree. Here's the link:
subject: Writing Image onto a WordDoc
BufferedImage makes black quadrate instead of picture
Convert image to byte and viceversa
where does BufferedImage save files?
Save Image into different domain
how to get image from JPanel
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014