5

I'm working in C# with Spire.PDF. Specifically, my goal is to load binary PDF data from a database into a Spire.Pdf.PdfDocument object.

According to this documentation, I should be able to use the LoadFromStream() method or some unspecified method that takes a byte array (see bottom of page at link where there is a link but only to the general documentation). However, this method seems absent from the current NuGet package.

So, in summary, how can I make a Spire.Pdf.PdfDocument object using a byte array of data? Thanks in advance.

Please comment if you know a better .NET library for converting PDFs to and from images.

Scotty H
  • 6,432
  • 6
  • 41
  • 94
  • I just downloaded the most recent version (3.5.51.5040) from NuGet and I can both create a `PdfDocument` via the constructor from a stream as well as call `LoadFromStream()` on a previously created `PdfDocument` instance. – Chris Haas Oct 01 '15 at 20:13
  • @ChrisHaas Sorry I forgot to mention I'm using the free version, which is at 3.20. I'll give the unfree version a try. – Scotty H Oct 01 '15 at 20:19
  • @ChrisHaas So yeah, it works with the nonfree/evaluation version. That's unfortunate. Wonder if those changes will trickle to the free library soon. I posted a question on their forums. – Scotty H Oct 01 '15 at 20:47
  • There seem to be limitations imposed on the free version. I am using 3.8.45 and cannot use SaveToStream with the SVG file format: The memorystream is empty. But if I use SaveToStream with PDF file format, or SaveToFile with SVG file format, it works fine. – Optavius Nov 07 '16 at 19:39

0 Answers0