We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Doconvert() method throwing exception


The doconvert method throws exception for couple of pdf files. The exception is "The input file was encrypted and no or invalid password has been specified."

But the file is not encrypted.

The code is given below :


pdfConverter.DoConvert(); - this line throws exception.
using (MemoryStream ms = new MemoryStream())
pdfConverter.GetNextImage(ms, System.Drawing.Imaging.ImageFormat.Png);
returnValue = ms.ToArray();

This is the exception detail:

Aspose.Pdf.Kit.PdfKitErrorCodeException: The input file was encrypted and no or invalid password has been specified.
at x30a678191d9b1780.x573da502a3364b6b.x5b81632e5b71b64c(Int32& x67a39b7274cec48f, Int32 x5c4ff2905d409caf, Int32 x820562bfe91b4e71, ImageFormat x0d9146d51b0e6ca4, Int32 x76cfa4602af6a972, Int32& x39b5532b4ddc40a3)
at Aspose.Pdf.Kit.PdfConverter.xaf6adc9ec3dfd936()

Please let me know if it is an issue.

Thanks & Regards,

Hi Sunil,

Thanks for using our products.

Can you please share the source PDF files causing this problem so that we can test the scenario at our end. We are sorry for this inconvenience.


I’ve attached the pdf which is having this issue.


Hi Sunil,

Thanks for sharing the resource file.

I have tested the scenario using Aspose.Pdf for .NET 8.0.0 and I am unable to notice any problem during conversion process. Can you please try using the latest release version and in case the problem still persists, please share some details regarding your working environment.


//create PdfConverter object<o:p></o:p>

PdfConverter objConverter = new PdfConverter();

//bind input pdf file


//initialize the converting process


//check if pages exist and then convert to image one by one

while (objConverter.HasNextImage())

objConverter.GetNextImage("c:/pdftest/grade+report"+DateTime.Now.Ticks.ToString() + ".jpg", System.Drawing.Imaging.ImageFormat.Jpeg);

//close the PdfConverter object


Please note that since July-2011, Aspose.Pdf.Kit for .NET has been discontinued as a separate product and all its classes and enumerations are merged under Aspose.Pdf.Facades namespace of Aspose.Pdf for. NET. For further details, please visit

thanks a lot, the new version has fixed the issue.

Hi Sunil,

I am glad to hear that your problem seems to be fixed in latest release version of Aspose.Pdf for .NET. Please continue using our product and in the event of any further query, please feel free to contact.