How to open PDF in PDFsharp where PDF is added as a resource to the project

Viewed 3256

I'm getting an error in the path because it's retrieving System.Byte[] in it. How can I access the PDF which is added in my resources?

Code:

PdfDocument = PdfSharp.Pdf.IO.PdfReader.Open(My.Resources.CANEezz_Individual.ToString, PdfDocumentOpenMode.Modify)

Dim font9 As XFont = New XFont("Arial", 8)
Dim page As PdfPage = PdfDocument.Pages(0)
Dim graph As XGraphics = XGraphics.FromPdfPage(page)
graph.DrawString("Bank Passboook", font9, XBrushes.Black, 518, 343)

Dim pdfFilename As String = "something.pdf"
PdfDocument.Save(pdfFilename)
Process.Start(pdfFilename)
1 Answers
Related