0

I'm using SyncFusion to create PDFs and was wondering how I could convert an array byte I have of a signature that was drawn on a canvas in XAML/C# to a PdfBitmap. So I could add the signature to the PDF document.

//requires stream of a file, but I only have a byte array
PdfBitmap image = new PdfBitmap(stream);
graphics.DrawImage(image, 0, 0);
Teysz
  • 741
  • 9
  • 33

1 Answers1

3

You can find your answer in @Patrick McDonald comment. However, for further reference, here it is what you need:

Stream stream = new MemoryStream(byteArray);
PdfBitmap image = new PdfBitmap(stream);
graphics.DrawImage(image, 0, 0);
jpedro20
  • 71
  • 1
  • 5