We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Loading stream into PDFLoadedDocument. Unexpected type error

Thread ID:





100260 Jul 20,2011 09:25 AM UTC Jul 21,2011 08:36 AM UTC WinForms 2
Tags: PDF
John Owens
Asked On July 20, 2011 09:25 AM UTC

Hi there,

I'm using the PDF component to load a stream from the database (SQL Server 2008). The stream in the database is stored as binary data type. Each stream has different contents and represent different file types e.g. .pdf, .doc, .jpg, .xls

I wrote a function to load the stream into a new PDF object.

Dim pdf As New Syncfusion.Pdf.Parsing.PdfLoadedDocument(strm)

pdf = Nothing

On the first line above, it would fail to load most time citing "Invalid/Unknown/Unsupported format". I noticed that when I loaded a stream that was a PDF file type, it would save. Any other types like .doc, .xls or .jpg, it would not save.

Can you please confirm if the stream is supposed to be a PDF type?

Is there any way I can 'convert' the stream to a PDF type so I can save it as a PDF?


John Owens
Replied On July 20, 2011 10:18 AM UTC

Hi there,

I found the ExcelToPDF among your components. I was using a different namespace.

I've changed the code to check what file types are being returned so I can either save a PDF file directly or convert it first.

It works! Thanks.


Geetha M [Syncfusion]
Replied On July 21, 2011 08:36 AM UTC

Hi John,

Thank you for your interest in Syncfusion products.

Glad to hear that you problem has been resolved.

Please let me know if you have any questions.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon