AcroPDFLib to open PDF file from stream in WindowsForms C# .NET

I've spent the whole afternoon looking for an answer to my question and found none :(

I'm making a windows forms application and one of it's features is to show files stored in a DB. This files, upon upload, can be marked as "read-only", meaning they cannot be downloaded. At this point, I'm struggling with PDF files. I'm using the AcroPDFLib and I can't find a way to display the file from the byte array stored in the DB.

So, my question is, is there a way to open a PDF file from a stream? Even if it's a plugin, what plugin is that and where can I find it?

Using the web browser object, I don't think it will work since I would have to create something server-side that sends to the response output the stream. And creating the file in a temporary folder... well, in that case I might as well allow the file download :D

Thanks for your help


In order to do what you want, you need to open the file from a memory stream, however from the Interapplication Communication API reference from Adobe we get that there is only one Open(...) method:

Syntax: VARIANT_BOOL Open(BSTR szFullPath, BSTR szTempTitle);


szFullPath The full path of the file to open.

szTempTitle An optional title for the window in which the file is opened. If szTempTitle is NULL or the empty string, it is ignored. Otherwise, szTempTitle is used as the window title.

So I would guess that what you are trying to do cannot be done with Adobe's library.

Need Your Help

How to write the content of one stream into another stream in .net?

.net stream

I often run into the problem that I have one stream full of data and want to write everything of it into another stream.

SQL Server 2008R2 - INSERT from Multiple Tables

sql select join sql-server-2008-r2 sql-insert

I am having an issue (well two issues actually) with my stored procedure, and I could be making a rookie error here but I've attempted to fix it and failed miserably. Enter the gurus of stack overf...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.