Getting error with a PDF 2.0 file: “Pdf version 2.0 does not supported yet.”

Hi,

I’m using Aspose.PDF 25.4.0 and I still get this error with a PDF 2.0 file: “Pdf version 2.0 does not supported yet.

This error happens in the “Aspose.Pdf.Document.Validate” method:

Aspose.Pdf.Document newDoc = new Aspose.Pdf.Document(stream); // it’s a PDF v2.0

newDoc .Validate("C:\PDF-2-utf8.pdf.0785714b-17db-4ae9-a7ff-093c74c532a3.valid.xml, Aspose.Pdf.PdfFormat.v_1_7)

StackTRace

at #=zpYYOV972WjLS7255ZbWB5xYglQyZmBSl4A==.#=zLNll1e4d6J3B(Double #=zU9HfLsA=)
at #=zMSmXNuoYE9P1adrL$$DRmmWcZzfey9eSyBPU46HAwZHNMZ7Qzg==.#=zb8QgZN0=(XmlTextWriter #=zCWDDP$Y=, PdfFormat #=zT4sUpgE=, Document #=zcEvbIbo=, Boolean #=zs$4QT7T9bYaD, ConvertErrorAction #=zhSB3zIY=)
at Aspose.Pdf.Document.#=zzFxYPrY=(XmlTextWriter #=zCWDDP$Y=, PdfFormat #=zT4sUpgE=, Boolean #=zs$4QT7T9bYaD, ConvertErrorAction #=zhSB3zIY=)
at Aspose.Pdf.Document.Validate(String outputLogFileName, PdfFormat format)

Is the PDF version 2.0 supposed to be fully supported in the latest Aspose.PDF (version 25.4.0), if not is this a bug and can you take a look at it please?

That said, I belive that the “Validate” method shouldn’t throw an exception, instead it should return “false” and add the validation errors to the “validation errors xml” (the 1st argument of this method).

Thanks

@duvidasAspose

If possible, can you please share your sample PDF document for our reference so that we can test the scenario in our environment and address it accordingly?

Hi,

Sure, here is the PDF version 2.0.

PDF-version2.0-utf8.pdf (13.6 KB)

Thanks

@duvidasAspose

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): PDFNET-59797

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.