Hello everyone.
I just on week work with PDFSharp , it is real good idea, but today i found problem with it.
I have Web application on ASP.NET what was hosted on somee.com server.
Local Development server in VS2010 (local web server) does not issue error.
But, when i hosted my application on server and try to open PDF file
Server Error in '/' Application. The system cannot find the file specified Code:
protected void pdfBtn_Click(object sender, EventArgs e)
{
initializeFormControls();
// Create a new PDF document
PdfDocument document = new PdfDocument();
// Create an empty page
PdfPage page = document.AddPage();
// Get an XGraphics object for drawing
XGraphics gfx = XGraphics.FromPdfPage(page);
// Create a font
XFont font = new XFont("Verdana", 20, XFontStyle.Bold);
// Draw the text
gfx.DrawString("Som text", new XFont("Georgia", 11, XFontStyle.Regular), XBrushes.Black, new XRect(70, 150, page.Width, page.Height), XStringFormat.TopLeft);
// Save the document...
string filename = "Arve " + arveNumberLbl.Text.ToString() + ".pdf";
//document.Save(filename);
// ...and start a viewer.
ProcessStartInfo info = new ProcessStartInfo(filename);
Process.Start(info);
}