Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
Writing Image onto a WordDoc
Dushyant Chhetri
Ranch Hand
Posts: 75
posted 12 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hi,
How Do I write an Image using
Java
Code on a WordDoc.
I tried using the BufferedImage Class.
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.
Ulf Dittmer
Rancher
Posts: 43081
77
posted 12 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
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.
What's wrong? Where are you going? Stop! Read this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
where does BufferedImage save files?
Convert image to byte[] and viceversa
BufferedImage makes black quadrate instead of picture
how to get image from JPanel
Save Image into different domain
More...