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

Free Support Forum - aspose.com

How to get PDF version using API?

How to get the PDF version using Aspose PDF? I can read first few bytes of a file manually (%PDF-1.6), but I hope there is an API for that?


Thanks in advance for any help.

Hi there,


Thanks for your inquiry. Yes you can check Pdf document version by using Document class as following.

Document doc = new Document(“input.pdf”);
MessageBox.Show(doc.Version);

Please feel free to contact us for any further assistance.

Best Regards,

I can’t see a Document class in Aspose PDF for Java?

If you mean new Pdf(“document.pdf”).version(), it returns “Aspose Pdf.Java 3.3.0” and not the PDF version which is “1.5” in my case.

Hi Borewicz,


Sorry for the inconvenience faced. I’m afraid mistakenly I shared Aspose.Pdf for .Net details. Currently the feature only supported in Aspose.Pdf for .NET and Aspsoe.Pdf for Java or Aspose.Pdf.Kit for Java does not provide Pdf document version. However we are busy testing the auto ported version of Aspose.Pdf for .NET to Java platform which will support/provide all the features as currently offered by Aspose.Pdf for .NET and it will also offer the requested functionality over Java platform.

The product is under testing phase and is not yet released. Once the new Auto-ported version of Aspose.Pdf for Java becomes available, we would be more than happy to update you with the status of correction.

Please feel free to contact us for any further assistance.

Best Regards,