Developer technologies | VB
An object-oriented programming language developed by Microsoft that can be used in .NET.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
How can I add the pdf in D drive in the following code
Dim gfx As PdfSharp.Drawing.XGraphics
Dim page As Pdf.PdfPage
Dim size As PdfSharp.Drawing.XSize
Dim font As PdfSharp.Drawing.XFont
Dim path As PdfSharp.Drawing.XGraphicsPath
Dim pen As PdfSharp.Drawing.XPen
Dim pdfDoc As Pdf.PdfDocument
page = New Pdf.PdfPage()
page.Size = PdfSharp.PageSize.Letter
pdfDoc = New Pdf.PdfDocument()
pdfDoc.Pages.Add(page)
'page = New Pdf.PdfPage("d:\a.pdf")
gfx = PdfSharp.Drawing.XGraphics.FromPdfPage(page, XGraphicsPdfPageOptions.Prepend)
size = gfx.MeasureString("sahin", font)
gfx.TranslateTransform(3, 5)
gfx.RotateTransform(5)
gfx.TranslateTransform(2, 5)
path.AddString("ss", font.FontFamily, XFontStyle.BoldItalic, 150, New XPoint(50, 55), XStringFormat.Default)
pen = New XPen(XColor.FromArgb(128, 255, 0, 0), 2)
gfx.DrawPath(pen, path)
An object-oriented programming language developed by Microsoft that can be used in .NET.
Read first the documentation, ask the author or community at https://github.com/topics/pdfsharp
You'd call .Save() at the end, i.e.:
pdfDoc.Save("d:\\a.pdf");