removePages does not delete Acroform Fields of this page


Product Version:8.7

Please give a brief summary of your issue:
When I remove a page, acroform fields that are inside this page are not deleted

const { documentViewer } = this.wvInstance.Core;
const doc = documentViewer.getDocument();
const obj: any = await doc.removePages(pages_ids);

I also tried to remove fields directly :

const { annotationManager } = this.wvInstance.Core;
const annotation_list: Core.Annotations.Annotation[] = annotationManager.getAnnotationsList();
const to_delete_annotations: Array<Core.Annotations.Annotation> = new Array<Core.Annotations.Annotation>();
for (const c_annot of annotation_list) {
  if (pages_ids.indexOf(c_annot.PageNumber) != -1) {

It does not work
When I read acroform with PDFBox at server side, fields in this page still appears :

PDAcroForm form = doc.getDocumentCatalog().getAcroForm();
List<PDField> fields = form.getFields();
for (PDField field : fields) {
    buffer.append(printField(field, pages, 0));

Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)

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:


Hello n.alcina,

Can you provide the document mentioned in the post?

Best regards,
Tyler Gordon
Web Development Support Engineer