Free Support Forum - aspose.com

flatteningAnnotations

I am having trouble flattening the annotations within certains pdfs with the Pdf.Kit product. My code is simple and is as follows:

PdfAnnotationEditor in = new PdfAnnotationEditor();
in.bindPdf(args[0]);

Utility.write(“Flattening”);

FileOutputStream fos = new FileOutputStream(args[1]);

in.flatteningAnnotations();

in.save(fos);

fos.flush();
fos.close();

I have attached the sample document that does not appear to correctly flatten. Page 1 has a Highlight and a Strikeout annotation neither of which appear in the output file.

Let me know if you need any further information.

Thanks,
Joe

Hi Joe,

I have reproduced this problem at my end and logged it as PDFKITJAVA-28760 in our issue tracking system. Our team will look into this issue and you’ll be updated via this forum thread once it is resolved.

We’re sorry for the inconvenience.
Regards,

Then I assume that this issue still exists in your software. I previously reported this issue and you logged it with PDFKITJAVA-25238. If possible, can your team just look at the source document to see what specific annotation attribute your software is looking for that is lacking. Then I can likely resolve the issue on my end. My issue is your software is simply silently failing.

Hi Joe,

You’re right. The other issue you mentioned earlier, in your other thread, is not yet resolved either. However, I have asked our team to share the ETA of both of these issues. You’ll be updated with the status the earliest possible. We’ll also provide you any further helpful details after investigation.

We’re sorry for the inconvenience.
Regards,


OK. I would like to purchase your libraries and believe that this issue is not a problem directly related to your libraries but stems from the source document lacking a particular tag or attribute in the way that it produces it’s annotations. If you could have your team look at the annotations and see what is lacking I can hopefully do some pre-processing that will enable me to use your libraries for the actual flattening. Let me know as soon as you have additional information.

Hi Joe,

As I shared earlier, our team still needs to investigate this issue in detail. Moreover, such issues are usually caused due to the particular structure of the PDF file; however, we’ll try to make sure that the fix for this issue caters any such scenario. We’ll let you know, if you need to change something in the input PDF file.
However, most probably, this kind of issues will be resolved with this fix.

We’re sorry for the inconvenience and appreciate your cooperation.
Regards,