Save annotation throwing Custom filter is not valid error

Product: Java SDK

Product Version: latest

Please give a brief summary of your issue: Save annotation throwing Custom filter is not valid error
(Think of this as an email subject)

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
Saving annotations to same PDF file is throwing Custom filter is not valid error. Below is the code I am using
PDFDoc doc = new PDFDoc(inputStream);
createAnnotation(doc);
doc.save();

inputStream is the file data retrieved from external system. Please let me know how I can save/merge the annotations to same input PDF document using PDFTron java API

Please provide a link to a minimal sample where the issue is reproducible:

Hello, I’m Ron, an automated tech support bot :robot:

While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages:

Guides:Forums:

Hello Mohan,

Thank you for contacting us about this. To get a better understanding of the issue, could you please provide us with a full sample code or project where the issue can be reproduced on?

In particular, we would require the code you are using to load the document into a filter, so that we can accurately replicate the issue.

Thank you in advance for the additional information.

I found a solution. Thanks