Last post Apr 11, 2011 12:38 AM by Pebble94464
Oct 16, 2007 10:51 AM|chilluk|LINK
I have been trying without any success to get a PDF file to stream into a page.
The PDF file is generated / hosted on another domain (our own same server but 3rd party software)
I've trawled the Net and tried to use / adapt some examples but I get nothing at all in the page.
Ideally if I could also wrap it up in a user control that returns the PDF that would make life easier.
Anyone know of any good reliable code (VB preferably) that would help with this.
Oct 16, 2007 12:02 PM|Joël Hébert|LINK
i would use abcpdf for the $ it is not worth coding, and the features like the TOC(table of contents) is amazing...it is a great tool....apart from that I used to use Response.binary write to dump the pdf to the screen but since using abcpdf I have never
time vs cost
Oct 17, 2007 04:17 AM|chilluk|LINK
I'm not sure I can because the PDF is created on the fly by another page - so ultimately I am going to have to call that page and stream the resultant PDF in from it.
Apr 11, 2011 12:38 AM|Pebble94464|LINK
Chilluk, the following example in VB.NET show how you might dynamically create a PDF document and stream it over HTTP. It uses the ABCpdf.NET PDF library that Joel mentioned...
Dim theDoc As New Doc()
Dim theData As Byte() = theDoc.GetData()
Response.ContentType = "application/pdf"
Response.AddHeader("content-disposition", "inline; filename=MyPDF.PDF")