473,385 Members | 1,218 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

base64 image embedded in xml return document, how to extract?

If this is not the right place to post, please someone direct me to the
correct place.

I'm having problems extracting the binary data that's included in an xml
response back from a server. It's an embedded PDF file that's been base64
encoded. I've got it narrowed down to to a single node using
Msxml2.DOMDocument.4.0 and selectSingleNode but how do I get the data from
there to a PDF file and get the browser to display it.

Can someone kick me in the right direction? I've done all kinds of Google
searches but can't seem to find the right combination of words. A hint (or
heck, some ASP code - not ASP.NET) would be greatly appreciated.

Thanks very much,
Chris
Mar 26 '06 #1
1 5287

Chris wrote:
If this is not the right place to post, please someone direct me to the
correct place.

I'm having problems extracting the binary data that's included in an xml
response back from a server. It's an embedded PDF file that's been base64
encoded. I've got it narrowed down to to a single node using
Msxml2.DOMDocument.4.0 and selectSingleNode but how do I get the data from
there to a PDF file and get the browser to display it.

Can someone kick me in the right direction? I've done all kinds of Google
searches but can't seem to find the right combination of words. A hint (or
heck, some ASP code - not ASP.NET) would be greatly appreciated.

Thanks very much,
Chris


I am a complete amateur at all of this, but offer the following
thoughts:-

1. If you want to extract the binary from the node client side then
you may need to ask at the comp.lang.javascript or
microsoft.public.scripting.jscript / vbscript. However this is not
natively possible to do. Neither JavaScript/JScript nor VBScript have
native binary file handling AFAIK. It is possible to save binary data
to disk using the ActiveX Scripting.FileSystemObject provided you know
what code-page your client is using, or by using the ADODB.Stream
ActiveX object (if it is enabled), security permissions allowing. But
then you will need to run the file, which may need the Windows Script
Host (WSH), or alternatively you could try specifying the save file
path as the URI for a pop-up or IFRAME.

2. The alternative may be to open an IFRAME, point it to the ASP
page, and have the ASP page return pure binary with a response header
setting a content-type to the appropriate PDF description.

3. The third alternative is to save the PDF as a temporary file on
the server, and again, as per 2, open an IFRAME or pop-up window, with
the URI pointing to the temporary file.

I could be way off the mark with all of this, but that is what I would
try.

Regards

Julian Turner


2. Instead of returning an XML, the alternative may be

Mar 28 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Phil Powell | last post by:
PHP 4.3.2 with --enable-exif I have the following class: <?php class ThumbGenerator extends MethodGeneratorForActionPerformer { function ThumbGenerator() { // CONSTRUCTOR
27
by: gRizwan | last post by:
Hello all, We have a problem on a webpage. That page is sent some email data in base64 format. what we need to do is, decode the base64 data back to original shape and extract attached image...
0
by: Kunal | last post by:
Hi all, I have run into a problem that I can't quite figure out. Here is the situation: I have to capture a signature from a WebForm. (The ASP.NET application is running on a TabletPC) ...
6
by: Chris Fink | last post by:
I have an xml document that contains some elements encoded as Base64. How do I dynamically scan the XML Document and pull out the sections that are Base64... My overall goal is to display the...
7
by: Neo Geshel | last post by:
Greetings. I have managed to stitch together an awesome method of posting text along with an image to a database, in a way that allows an unlimited number of previews to ensure that text and...
5
by: Jay | last post by:
I have bean trying to get my head around reading .GIF files from base64 strings, Basically I need to specify a filename and convert it to base64 then I can copy/past the string to wear I want it....
0
by: ayyanarj | last post by:
Hi, I have a word document that has attached(ie. embedded ) documents like word, ppt, pdf, etc. I have to extract those embedded documents in the document through code. To extract...
5
by: Steve | last post by:
Hi all Does anybody please know a way to extract an Image from a pdf file and save it as a TIFF? I have used a scanner to scan documents which are then placed on a server, but I need to...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.