Print Page | Close Window

ASP.NET returning PDF

Printed From: Debenu Quick PDF Library - PDF SDK Community Forum
Category: For Users of the Library
Forum Name: I need help - I can help
Forum Description: Problems and solutions while programming with the Debenu Quick PDF Library and Debenu PDF Viewer SDK
URL: http://www.quickpdf.org/forum/forum_posts.asp?TID=549
Printed Date: 19 May 24 at 5:26AM
Software Version: Web Wiz Forums 11.01 - http://www.webwizforums.com


Topic: ASP.NET returning PDF
Posted By: Jim Sullivan
Subject: ASP.NET returning PDF
Date Posted: 31 Oct 06 at 1:19PM

I need to return a dynamically generated PDF to my users.  I'm using ASP.NET 2.0.  I am able to return the PDF using SaveToVariant, but if I try to display it in IE, I get a completely blank screen.  If the user right-clicks the hyperlink and does Save Target As, then they get the PDF.  It seems like this is a known issue with IE ( http://support.microsoft.com/default.aspx?scid=kb;en-us;Q305153 - http://support.microsoft.com/default.aspx?scid=kb;en-us;Q305153 ), but I can't get the workaround to work.

I know this isn't really a QuickPDF issue, but if anyone else has done this, let me know.

I did try the KB article at ised's site, but it's the same thing that I've been doing.




Replies:
Posted By: bogey
Date Posted: 31 Oct 06 at 2:11PM

This is how I do it with traditional ASP.

Response.ContentType = "application/pdf"
Response.AddHeader "Content-disposition",  "inline; filename=" & timer * 100 & ".pdf"
Response.BinaryWrite QP.SaveToVariant()




Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.01 - http://www.webwizforums.com
Copyright ©2001-2014 Web Wiz Ltd. - http://www.webwiz.co.uk