Product:@pdftron/webviewer
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) {
to_delete_annotations.push(c_annot);
}
}
annotationManager.deleteAnnotations(to_delete_annotations);
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: