Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Generating PDF to be downloaded
Message
From
12/02/2009 14:11:02
 
 
To
12/02/2009 12:17:52
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
ASP.NET
Category:
Reporting
Environment versions
Environment:
C# 3.0
Application:
Web
Miscellaneous
Thread ID:
01381307
Message ID:
01381384
Views:
41
>I know I can use Crystal Reports to create a .pdf file on the web server and then provide a URL to the user to download the file, but is there a way to skip creating the .pdf file? I don't want to have to worry about security and having users be able to download other users' documents.

Not tested, but should be possible. Use the XMLHTTP object to send the request for the PDF file to be generated. On the Server end, when the request is received, generate the PDF (as temporary file), send it back to the client as a response with Response.BinaryWrite method. Once sent, delete the server-side version. On the client-side the PDF is received in the .PDF with the .ResponseBody property (http://msdn.microsoft.com/en-us/library/ms535874(VS.85).aspx). Once received, it can be saved, displayed, or what-ever. There several examples on the web: Google XMLhttp Object.
Greg Reichert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform