We have a PDF file that
Aspose.Pdf is corrupting just by virtue of opening / saving the file.
This file (221.pdf (41.3 KB)) is fine before using
Aspose.Pdf. If I do the following:
new License().setLicense(Main.class.getClassLoader().getResourceAsStream("com/muhnamespace/Aspose.Total.Java.lic")); Document pdf = new Document("221.pdf"); pdf.save("aspose.pdf")
It will create this file: aspose_corrupted.pdf (41.6 KB)
What’s interesting is if we do this:
// do not set our Aspose.Total license key...so "evaluation" mode Document pdf = new Document("221.pdf"); pdf.save("aspose.pdf")
It will create this file: aspose_evaluation.pdf (68.0 KB) which is completely fine.
- nothing indicates a problem, except for the fact that you cannot open the file.
- we are using version
compile ( group: 'com.aspose', name: 'aspose-pdf', version: '20.11', classifier: 'jdk16' )