473,785 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.DOMDocum ent.4.0 and selectSingleNod e 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 5339

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.DOMDocum ent.4.0 and selectSingleNod e 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.javas cript or
microsoft.publi c.scripting.jsc ript / 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.FileS ystemObject 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
3657
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
15054
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 from it. Any help will be highly appriciated. Thanks
0
1716
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) Currently only an ActiveX control is available for WebForms, so I embedded it using the "<object>" tag.
6
8780
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 XML document in a browser will all the Base64 sections converted to Ascii (UTF-8).
7
7966
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 image are perfect before submission. This involves converting any uploaded image to a Base64 String and holding that in a hidden form field until either the post gets submitted to the database or the image gets replaced with another one. I...
5
4121
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. Cold somebody check this for me to see what I have done wrong: If you run this program and enter a path for a .GIF file into the white box and hit <Enter> it should display the string in the blue box. To test this if you click the menu File...
0
1289
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 embedded word document. I used the following code.
5
5765
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 extract the image of the document (just the first page if there are multiple pages) and save it as a TIFF so I can then use the Tesseract OCR to get the text in the image.
0
9645
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10153
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9952
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7500
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4053
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3654
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2880
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.