I have been ignoring this on my development pc without an issue. However I just deployed the site to our test web server and it appears that the page is hanging up where it opens the previously created pdf and writes a case number in the pdf document. The code follows:
FinalDoc = PdfSharp.Pdf.IO.PdfReader.Open(ConfigurationManager.AppSettings("UploadTemp") & "\" & lcEFileRec.FileName, PdfSharp.Pdf.IO.PdfDocumentOpenMode.Modify)
page = FinalDoc.Pages(0)
gfx = XGraphics.FromPdfPage(page)
gfx.DrawString(lcCase.CaseNumber, fontTextBold, XBrushes.Black, New XRect(360, 115, page.Width.Point, page.Height.Point), XStringFormats.TopLeft)
FinalDoc.Save(ConfigurationManager.AppSettings("UploadTemp") & "\" & lcEFileRec.FileName)
If I comment out the line: gfx.DrawString(lcCase.CaseNumber, fontTextBold, XBrushes.Black, New XRect(360, 115, page.Width.Point, page.Height.Point), XStringFormats.TopLeft) it works.
Any ideas?
|