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 app for network diagnostics
I agree. Here's the link:
subject: Writing Image onto a WordDoc
how to get image from JPanel
where does BufferedImage save files?
BufferedImage makes black quadrate instead of picture
Save Image into different domain
Convert image to byte and viceversa
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013