hi support.
Windows 2016 std.
I have a basic single webpage that i'm printing to PDF.
On the live server, i have an original file that works fine.
I've copied this file to my development PC and made a new file with a simpler html layout.
This did initially have a problem on my PC to start with, where it was creating multiple PDF files until i stopped the IIS Application Pool. but seem to resolved it self. now working fine on my development PC.
I've copied this file to the live server, and it has the same fault. it just keeps creating the same PDF over and over until i crash out the app pool..
the original servers file still works fine, so i'm really confused as to what could be causing it?
any ideas?
Quote:
private void RunMakePDF()
{
Runtime.AddLicense("asdojkhasdijasdjiashdnhasjdkoh - bla.. really long key");
ASPXToPDF1.RenderAsPDF(false);
}
protected void ASPXToPDF1_BeforeRender(object sender, EventArgs e)
{
HtmlToPdfOptions pd = new HtmlToPdfOptions();
pd.VisibleElementIds = "DivPDFPrintable";
EO.Pdf.HtmlToPdf.Options.PageSize = PdfPageSizes.A4;
}
protected void ASPXToPDF1_AfterRender(object sender, EventArgs e)
{
HtmlToPdfResult result = EO.Pdf.HtmlToPdf.Result;
Int32 Appid = Common.QueryStringInt("appid");
string Timestamp = DateTime.Now.ToString().Replace(" ", "").Replace(":", "").Replace("/", "");
string outputFileName = @"\Equ_" + Appid + @"_" + Timestamp + @".pdf";
string outputPath = ConfigurationManager.AppSettings["LocalFilePath"].ToString() + "" + Appid;
string FullPath = outputPath + outputFileName;
if (!System.IO.Directory.Exists(outputPath))
{
System.IO.Directory.CreateDirectory(outputPath);
}
result.PdfDocument.Save(FullPath);
SaveFile(outputFileName, Appid.ToString(), "equ");
// Response.Redirect("index.aspx");
}