Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Generating PDF to be downloaded
Message
De
12/02/2009 14:11:02
 
 
À
12/02/2009 12:17:52
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Rapports
Versions des environnements
Environment:
C# 3.0
Application:
Web
Divers
Thread ID:
01381307
Message ID:
01381384
Vues:
40
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform