I'm trying to convert an Html- into a PDF document, but no matter which approach I tried, I'm getting one of these errors:
You are in direct-to-file mode,please use Close() instead of Save(). (Pdf pdf = new Pdf(), then BindToHtml and save to MemoryStream)
Input stream for html data must be FileStream (Document pdfDocument = new Document(memoryStream, htmlOptions))
The HTML is converted into a byte array,
written into a MemoryStream,
should now be converted to PDF by creating Document/Pdf saving into a new MemoryStream
and finally returned as a byte array to be stored in SharePoint.
I’m using 188.8.131.52 and it is not possibly to save the PDF to a harddrive.
The tricky part seems to be that I get a byte array and want to save the PDF to a MemoryStream…
I appreciate any help.