Load password-protected document

GroupDocs.Conversion supports the conversion of documents that are protected with a password.

Here are the steps to follow to load and convert a password-protected document:

The following code sample shows how to convert password-protected document:

import com.groupdocs.conversion.Converter;
import com.groupdocs.conversion.options.convert.PdfConvertOptions;
import com.groupdocs.conversion.options.load.WordProcessingLoadOptions;
...
WordProcessingLoadOptions loadOptions = new WordProcessingLoadOptions();
loadOptions.setPassword("12345");

Converter converter = new Converter("sample_with_password.docx", loadOptions);
PdfConvertOptions options = new PdfConvertOptions();
converter.convert("converted.pdf", options);