PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

How To Stream PDF to IE
https://forum.pdfsharp.net/viewtopic.php?f=2&t=3362
Page 1 of 1

Author:  rmcx [ Wed May 18, 2016 4:51 pm ]
Post subject:  How To Stream PDF to IE

I have a client/server app where I generate PDF files using PDFSharp in C#.

I would like to deliver the files to a web browser, preferably using a byte stream. I can do this successfully in all browsers except IE/Edge, which prohibits using a data URI pointing to PDF's.

At the moment, then, I'm writing the PDF to a bucket in Amazon Web Service's S3 and then opening a new tab with that URL.

This works most of the time, but occasionally glitches.

So, am looking for a "better" solution.

Is there one???

Thx

Author:  Thomas Hoevel [ Thu May 19, 2016 8:07 am ]
Post subject:  Re: How To Stream PDF to IE

Hi!

I do not understand what you are doing now, but the code in our web sample was tested successfully with IE:
http://www.pdfsharp.net/wiki/Clock-sample.ashx

Author:  rmcx [ Thu May 19, 2016 5:50 pm ]
Post subject:  Re: How To Stream PDF to IE

Thanks for the link. I tried clicking on the live sample to see what would happen, but the response just times out.

Here's what I'm trying to accomplish:

I send in a request to the server from the browser and am expecting two types of return: status information about the operation and a resulting PDF file.

I want to display the status information on the current browser page and I want to open the PDF file in a new window/tab.

My original idea was to send the PDF file as a stream of bytes within the status block and then open a new window pointing to that data with a data URI notation (data:application/pdf).

That works fine in all browsers except IE, which is very restrictive when it comes to data URI's.

Hence my original question.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/