AcroPDFLib open a PDF file from a stream in Windows Forms C # .NET

I spent the whole day looking for the answer to my question and did not find any: (

I am making a Windows forms application, and one of its functions is to show files stored in the database. These files can be marked as read-only when they are downloaded, that is, they cannot be downloaded. I am currently struggling with PDF files. I am using AcroPDFLib and I cannot find a way to display a file from an array of bytes stored in the database.

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

Using a web browser object, I do not think it will work, since I will need to create something server-side that sends a response, output the stream. And creating the file in a temporary folder ... well, in this case, I could also allow the file to be downloaded: D

thanks for the help

+5
source share
1 answer

To do what you need, you need to open the file from the memory stream, however, from the communication API link using an application from Adobe, we get that there is only one Open (...) method:

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

Parameters:

szFullPath The
full path to the file to open.

szTempTitle
, . . szTempTitle NULL , . szTempTitle .

, , , , Adobe.

+4

All Articles