Welcome Guest Search | Active Topics | Sign In | Register

ASpxPDF external call Options
Johnathan
Posted: Thursday, January 19, 2012 5:40:25 AM
Rank: Member
Groups: Member

Joined: 1/10/2012
Posts: 15
Hi

I am using ASptoPDF to render a complex data driven page as a pdf.
The page contains a lot of graphics and therefore the time to build and then stream (2meg file) to the user is a little long.

I have therefore decided to generated the file and save it to disk to avoid it being created every time (the data changes once a week, so the same report is valid for 7 days) and display a link to the pdf to download if it already exists.

I have modfied my complex apsx page to that it renders the pdf and also saves it to disk, however this also then streams the file to the user and I can't seem to save to disk "silently"

My question is - is it possible to render an aspxfile from another page or other code?
So ideally I would like to have a UI that with a button that says "Build PDF". when clicked this builds the pdf from the aspx page and saves it to disc but does not stream it. Once the build is complete it displays the link below for the user to download it with a further click.


Is it possible to call the aspxtopdf from a url other than the actual page the code is in?

Thanks

johnathan
eo_support
Posted: Thursday, January 19, 2012 9:35:36 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

If you just wish to render another page, you can simply call HtmlToPdf.ConvertUrl(your_page_url, final_file_name). It's a single call and it's even easier than ASPXToPDF.

Thanks
Johnathan
Posted: Thursday, January 19, 2012 9:37:24 AM
Rank: Member
Groups: Member

Joined: 1/10/2012
Posts: 15
thanks
eo_support
Posted: Thursday, January 19, 2012 10:05:19 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
You are welcome. Let us know if you have any other questions.

Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.