File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Services and the fly likes Decode base64 string to an image(pdf, png, ....) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Decode base64 string to an image(pdf, png, ....) " Watch "Decode base64 string to an image(pdf, png, ....) " New topic

Decode base64 string to an image(pdf, png, ....)

Rohit Borse

Joined: May 26, 2011
Posts: 1

I wanted to decode base64 string to an image(pdf,png,....)

Originally, image type (pdf, png,...) is getting encoded into base64 file in SOAP response as below

I am trying to decode value from Image body to pdf or png.

Please suggest a script for this.

Again, I need help for generating images if there exists more than 1 image parts in an xml response as below:


Rohit Borse
Elchin Asgarli
Ranch Hand

Joined: Mar 08, 2010
Posts: 222

Try Apache Commons Codec library that has base64 decoder and encoder.

Personal page, SCJP 6 with 91%, SCWCD 5 with 84%, OCMJD
I agree. Here's the link:
subject: Decode base64 string to an image(pdf, png, ....)
Similar Threads
Removing namespace prefixes from attributes
Decoding Base64-encoded GIF
Java Web Services 2
Display PDF in IE from byte array using Servlet
Converting a Base64 encoded String to an Image