Welcome Guest Search | Active Topics | Sign In | Register

Minimize server storage in Html to Pdf Converter Options
Misk
Posted: Wednesday, November 2, 2011 3:48:26 AM
Rank: Member
Groups: Member

Joined: 10/31/2011
Posts: 10
Hello,

I want to minimize used storage in the server, so I try this code to return pdf stream immediately

Quote:

Response.Clear();
Response.AddHeader("Content-Type", "binary/octet-stream");
Response.AddHeader("Content-Disposition",
"attachment; filename=ConversionResult.pdf;");
var x = HtmlToPdf.ConvertUrl("URL", System.Web.HttpContext.Current.Response.OutputStream);
Response.End();


so is there a better way to do this?
and can I do it without return "HtmlToPdfResult" in x variable ?

Thanks
eo_support
Posted: Wednesday, November 2, 2011 8:54:11 AM
Rank: Administration
Groups: Administration

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

You are doing it the right way. And yes, you can just do it without returning the HtmlToPdfResult x.

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.