Hi All,
YES, I have checked the samples of pdfsharp and searched for many hours for finding the solution for this very basic issue.
I have created reference and able to run hello world program successfully BUT am NOT able to know how to convert my existing aspx page into pdf.
Its urgent pls give the code lines if you have some as all links through google have already been tried by me.
Thanks in advance..
Below is the current code:
Private Sub subCreatePDF()
Dim document As PdfDocument = New PdfDocument
document.Info.Title = "Created with PDFsharp"
Dim page As PdfPage = document.AddPage
Dim gfx As XGraphics = XGraphics.FromPdfPage(page)
Dim pen As XPen = New XPen(XColor.FromArgb(255, 0, 0))
gfx.DrawLine(pen, New XPoint(0, 0), New XPoint(page.Width.Point, page.Height.Point))
gfx.DrawLine(pen, New XPoint(page.Width.Point, 0), New XPoint(0, page.Height.Point))
gfx.DrawEllipse(pen, 3 * page.Width.Point / 10, 3 * page.Height.Point / 10, 2 * page.Width.Point / 5, 2 * page.Height.Point / 5)
Dim font As XFont = New XFont("Verdana", 20, XFontStyle.Bold)
gfx.DrawString("Hello, World!", font, XBrushes.Black, _
New XRect(0, 0, page.Width.Point, page.Height.Point), XStringFormats.Center)
Dim filename As String = Server.MapPath("~\Documents\Intimation\Hello.pdf")
document.Save(filename)
Process.Start(filename)
End Sub