|
Rank: Newbie Groups: Member
Joined: 8/26/2013 Posts: 6
|
I am using the following code to place a div filled with a calendar into a PDF:
Code: C#
HtmlToPdf.Options.MinLoadWaitTime = 1500;
HtmlToPdf.Options.VisibleElementIds = "calendarContainer";
HtmlToPdf.Options.PageSize = new SizeF(PdfPageSizes.A4.Height, PdfPageSizes.A4.Width);
HtmlToPdf.Options.OutputArea = new RectangleF(0.15f, 0.15f, PdfPageSizes.A4.Height - 0.3f, PdfPageSizes.A4.Width - 0.3f);
HtmlToPdf.Options.AutoFitY = HtmlToPdfAutoFitMode.ShrinkToFit;
ASPXToPDF1.RenderAsPDF(string.Format("Kalender_{0}_{1}.pdf", YearString, datevalue.ToString("MMMM")));
On our testenvironment (Windows 2008R2 + IIS 7.5) it works without any problems. On another environment with Windows 2003 + IIS6 I get an emtpy PDF. Are there any known conflicts with other plug-ins? And does it matter if the div to render to PDF is not controlled by .NET (i.e. no runat="server")?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Hi,
Neither DIV nor plug-in matters. We can not think of anything that could cause a blank page, except for that VisibleElementIds is wrong, or your page is indeed blank. I would recommend you try it with a small simple test page and see if it works for you, then gradually add contents back and see what triggered the problem. Usually as long as you find out what triggered the problem,you will find out why it occurs.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 8/26/2013 Posts: 6
|
It appears I used an old EO.pdf.dll file from trial with my new license which required a newer dll. That resolved the issue.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,195
|
Glad to hear that the issue is resolved. Please feel free to let us know if there is anything else.
Thanks!
|
|