Can a PDF file be generated in client side

J

jbeteta

Hello,

My ASP.NET 2003 application generates Crystal Reports to PDF files, but
on the server side.
Is it possible to create these PDF files in CLIENT side?

Here is my function to create PDF files on server side:

Private Function To_PDF(ByVal oRpt As ReportClass)
PDFName = Session.SessionID + ".pdf"
'oRpt.Load()
'oRpt.SetParameterValue("param1", strMensajeRep)
Dim exportOpts As ExportOptions = oRpt.ExportOptions
oRpt.ExportOptions.ExportFormatType =
ExportFormatType.PortableDocFormat
oRpt.ExportOptions.ExportDestinationType =
ExportDestinationType.DiskFile
oRpt.ExportOptions.DestinationOptions = New
DiskFileDestinationOptions
CType(oRpt.ExportOptions.DestinationOptions,
DiskFileDestinationOptions).DiskFileName = Server.MapPath("../Temp/" +
PDFName)
oRpt.Export()
oRpt.Close()
oRpt.Dispose()
Dim popupScript As String = "<script>window.open('../Temp/" +
PDFName +
"','_self','menubar=yes,scrollbars=yes,toolbar=no,location=no,directories=no,resizable=yes')</script>"
Page.RegisterStartupScript("PopupScript", popupScript)

End Function

Thank you!
 
J

JustinBlat

I doubt there is really anything you could do on the client completely.
If you're just trying to avoid the postback, you could always make an
xmlhttp call to the server and return this code, or load the PDF page
in an iframe.
 
J

jbeteta

I asked this question because we have a web application which users can
run a Crystal Report and then
generate a PDF file (on server side, of course). BUT... I think that
many users using this functionality at the same time a lot of times,
can reduce performance of the web server significatively. How could I
avoid that, giving at the same time the chance to create PDF files?
 
G

Guest

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top