If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Creating PDF documents dynamically

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-22-04, 12:42
FrostByte25 FrostByte25 is offline
Registered User
 
Join Date: Mar 2004
Posts: 1
Question Creating PDF documents dynamically

I have a download page that draws data from an Image datatype in SQL Server and generates the requested file from the database. (The data is in the database, I know it would be better to house this on a file server and point to it - this is necessary though)

I can get every type of document to work perfectly through simple use of Response.ContentType of the individual files, *except* for PDF documents.

I have these opening into a new window, when the new window opens for a PDF doc, IE appears to load the reader, but then the page is blank. Looking at the source code gives me, "<P>&amp;nbsp;</P>" - no errors, just no data. Like I said, this works perfectly with images, word docs, etc. Thoughts, ideas or suggestions? I even tried the .AddHeader info to no avail. Below is the necessary code snippets.

Code:
' set the content type to PDF
Response.ContentType = "application/pdf"
' add content type header
Response.AddHeader "Content-Type", "application/pdf"
' set the content disposition
Response.AddHeader "Content-Disposition", "inline;filename=form.pdf"

' ...

    Response.BinaryWrite(rs(0))
Reply With Quote
  #2 (permalink)  
Old 03-23-04, 09:20
hausbro hausbro is offline
Registered User
 
Join Date: Mar 2004
Posts: 6
The only way that I've seen PDFs dynamically created with ASP is to use a developer's package that Adobe offers. Then you have to create a PDF form and load the form with ASP.

I would be curious if there are other ways to accomplish this.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On