Page 1 of 1

Password Secured Document

Posted: Fri Jul 17, 2020 9:44 am
by yjs
I am referring the sample code here.
https://www.docuvieware.com/guides/aspn ... ation.html

But it seems does not prompt to request password if the document was secure with a password.
I tried the online Demo which able to prompt and input password...

May I know how to handle with the document secure with password?

Re: Password Secured Document

Posted: Fri Aug 28, 2020 4:07 pm
by Fabio
Hello,

How do you load the document in the viewer?
Could you try using this way:

docuVieware.LoadFromStream(new FileStream(Globals.GetDocumentsDirectory() + @"\st_exupery_le_petit_prince.pdf", FileMode.Open, FileAccess.Read), true, "document.pdf");
docuVieware.RenderControl(Output);

You can also check the code into our sample on your local machine here: C:\GdPicture.NET 14\Samples\ASP.NET\DocuVieware (.NET Core)\aspnetcore-mvc_razor_app
It is the same code as our online demo.

Regards,
Fabio de Rose
Solution Engineer