Set the source of Adobe PDF browser plugin to be a byte stream?

[亡魂溺海] 提交于 2020-01-16 08:53:12

问题


Is it possible to have the source for an Adobe Plugin to be a PDF byte stream?

If so, how would this be declared in markup?

EDIT 1: OK, so let me elaborate on this. I have built a site that runs on Azure. The site's back-end is a WCF web service, also on Azure.

One particular functionality of the site has to do with reporting. Once the user selects the type of report they want, a request is made to the service and a byte stream of a pdf file is sent back as a response.

Now, the question is how would the user view the file? Is it possible to set the Adobe Acrobat PDF plugin's document source to be something along the lines of:

<OBJECT>
<PARAM src="asdfkjaskflasjdlfkjasd"/> //byte stream
<PARAM mimeType="application/pdf;"/> //stream's mime type
</OBJECT>

EDIT 2:

OK, so no-one wants to take a crack at this. However, the only reason I am asking is because it is entirely possible to set the source of an image with the following code:

<img class="myImage" img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAA"/>

where everything past the image/png;base64 represents the byte content of the image encoded as a base64 string.

So is it still possible?

Thanks,


回答1:


I doubt the Adobe plugin can be made to fetch PDF data from a data: URL.

And even if it is possible in some browsers, you will with 100% certainty not be able to achieve a cross-browser solution this way: data: URLs don't work in IE < 8 at all, and are limited to 32 kilobytes' size 8 and 9.

What speaks against simply serving the byte stream in a separate resource with a PDF content-type?



来源:https://stackoverflow.com/questions/5175035/set-the-source-of-adobe-pdf-browser-plugin-to-be-a-byte-stream

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!