PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Tue Apr 16, 2024 8:37 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How To Stream PDF to IE
PostPosted: Wed May 18, 2016 4:51 pm 
Offline

Joined: Sat May 07, 2016 9:34 pm
Posts: 9
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


Top
 Profile  
Reply with quote  
PostPosted: Thu May 19, 2016 8:07 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
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

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu May 19, 2016 5:50 pm 
Offline

Joined: Sat May 07, 2016 9:34 pm
Posts: 9
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 72 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group