Re: Printing secured PDFs files produece empty pages

56 views
Skip to first unread message

Support

unread,
Nov 23, 2012, 12:47:38 PM11/23/12
to pdfne...@googlegroups.com
 
You need to provide the password in the call to doc.InitStdSecurityHandler(). For example:
 
...
doc.InitStdSecurityhandler("My pass");
pdftron.PDF.Convert.ToXps(doc, xpsFilePath);
...
 
 

On Friday, November 23, 2012 2:56:10 AM UTC-8, Jan Baarß wrote:
Hi,

I try to print a PDF document that is secured via a password.
I'm using the Pdf2Xps Addon to convert the PDF before printing it.

pdftron.PDF.Convert.ToXps(doc, xpsFilePath);
var writer = PrintQueue.CreateXpsDocumentWriter(printDialog.PrintQueue); writer.WriteAsync(xpsFilePath);

Any idea what else to do that it will work?

Thanks for your Help
Jan

Support

unread,
Dec 10, 2012, 3:02:01 PM12/10/12
to pdfne...@googlegroups.com
 

You would use doc.GetSecurityHandler ().GetUserPassword(). For the owner password (GetMasterPassword()) because the original password may be truncated or padded it may not be the same as original owner password so you should probably not rely on this method to obtain the original pass.

 
 

On Monday, November 26, 2012 12:58:29 AM UTC-8, Jan Baarß wrote:
Hio,

thanks for the answer.
Is it possible too retrieve the already entered password (to view the pdf) from the viewer or else where?
So the user must nocht enter the password again.

Thanks for your help.
Reply all
Reply to author
Forward
0 new messages