Convert password protected document to pdf

We want to convert password protected document into pdf . Without asking password form the user .Is their any solution available.?

@gauravbhandari,

Thanks for your query.

I am not sure if you can load a password protected document without specifying a correct password via Aspose APIs object model. Even how could you open an encrypted document into MS Office (Word, Excel, Powerpoint) application without giving a correct password manually? Anyways, please provide details about your input document and attach the sample document here, you may zip the document prior attaching.

So what is the process to convert password protected document?

@gauravbhandari,

As requested earlier, please provide details about your input document and attach the sample document here, you may zip the document prior attaching. We will check it soon.

DOC file before conversion.zip (224.5 KB)
Attached document is password protected MS word document.

@gauravbhandari,

Thanks for the document.

I am afraid, you have to use the password to load the file into Aspose.Words’ Document object model.
MS Word does the same, it cannot open an encrypted file with a correct password.
In short, you have to give password to import the document as shown below:
e.g
Sample code:

Document doc = new Document(MyDir + "Document.LoadEncrypted.doc", new LoadOptions("password"));

doc.Save("output.pdf"); 

In the event of any other query, let us know with details.

Thankyou i will try to implement

@gauravbhandari,

Yes, you need to specify the correct password while loading your document as demonstrated by the sample code. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.