Pass byte[] array to javascript and convert the byte array to PDF in javascript.

Posted on 2010-03-31
Medium Priority
1 Endorsement
Last Modified: 2013-11-12
What i recieve in javascript is Byte array, This Byte array was created by converting a PDF to a Byte array and i recieve this Byte array from the server and i need to convert the Byte array into PDF format...    Can someone help me on this?
Question by:salinigayathri
  • 3
  • 2
LVL 75

Expert Comment

by:Michel Plungjan
ID: 29318340
Does not sound like something JS would be able to do
My answer is: don't. Grab the pdf on the server and serve it as pdf.

Author Comment

ID: 29347996
    Can you share what technology can handle this situation?
LVL 75

Expert Comment

by:Michel Plungjan
ID: 29353738
server side.

Sounds like you have the pdf already on the server or on someone else's server

If you have it on your own server, ajax a LINK to the pdf and open the pdf in an iframe or a new window

If it is on someone else's server or web service, get the pdf on your server and send it as application/pdf to the browser in an iframe or new window
You cannot ajax a pdf file to the browser - even if you had converted it to b64 or some other textual thing, because JS cannot show it

this COULD have worked, but I am sure it does not


Author Comment

ID: 29354314
PDF files are on the sever.  I want to print multiple PDF files, in client side, where the PDF are residing on the server. I do not want to open the PDF file. Without opeing the PDF file just print those files... This is the requirement. Please help me on this aspect.
LVL 75

Accepted Solution

Michel Plungjan earned 1000 total points
ID: 29355281
Not possible. Sorry.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question