Password Secured Document

Discussions about DocuVieware integration in GdPicture.NET.
Post Reply
yjs
Posts: 1
Joined: Fri Jul 17, 2020 9:37 am

Password Secured Document

Post by yjs » Fri Jul 17, 2020 9:44 am

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?

User avatar
Fabio
Posts: 39
Joined: Thu Aug 27, 2020 9:57 am

Re: Password Secured Document

Post by Fabio » Fri Aug 28, 2020 4:07 pm

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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest