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

Free Support Forum - aspose.com

Converting a PCL document to PDF throws uncatchable exception

Hello. I’m doing some testing here with PCL files generated from different sources and how they convert through different tools. There is a particular file that when run through your conversion tool throws an uncatchable exception and brings the application down. We’ve run the PCL file through 3 other tools and they are able to convert it correctly. Can anyone assist?

I’m using Aspose.Pdf version

The code I’m using to convert is:

        new Aspose.Pdf.License().SetLicense("Aspose.Total.lic");

        // Instantiate LoadOption object using PCL load option
        Aspose.Pdf.LoadOptions loadopt = new Aspose.Pdf.PclLoadOptions();
        // Create Document object
        Aspose.Pdf.Document doc = new Aspose.Pdf.Document(InputFilePath, loadopt);
        // Save the resultant PDF document

The exception that is thrown is follows:

System.ArgumentException was unhandled
Message: An unhandled exception of type ‘System.ArgumentException’ occurred in Aspose.Pdf.dll
Additional information: An item with the same key has already been added.

And I’ve attached my test document grashopp.zip (104.0 KB) which is actually the a test document out of the GhostScript tool.


Thanks for contacting support.

We are able to replicate the issue in our environment which you have mentioned. For the sake of correction, we have logged it as PDFNET-43535 in our issue tracking system. We will further investigate the reasons behind this issue and keep you updated with the status of its rectification. Please be patient and spare us little time.

We are sorry for the inconvenience.

This seems very strange. It fails precisely on:

Aspose.Pdf.Document doc = new Aspose.Pdf.Document(InputFilePath, loadopt);

Yet performs fine on a dozen other files. So you are saying it converts just fine when you run it? Can you send me the .pdf output that you generated?


Thanks for writing back.

As shared earlier, we have tested the scenario in our environment and observed the same issue which you are facing. The API threw an System.ArgumentException exception while generating the PDF from your PCL file. So we have logged an issue in our issue tracking system with the ID, which we have shared in our earlier reply. We will further look into the details of the issue and keep you posted with the status of its resolution. Please spare us little time.

We are sorry for this inconvenience.

Oh whoops. I misread your reply. Thank you. Is there a way for me to directly see progress on ticket PDFNET-43535?


We have linked your post to this ticket, and you can ask for an update in this thread. We do not allow clients to access the internal ticketing system, and even the paid support clients have very limited access.