Skip to content

How to remove the form fields and comments from pdf. #118

@hj462

Description

@hj462

What were you trying to do?

I was using this PDF. I want to keep and delete the form fields and comments based on user decision. Some thing like Docusign does.

TBD%20Pin%20Hook%20Road%20Scheutz%20Contract%20DRAFT.pdf

How did you attempt to do it?

Have tried flattening to keep but it removes annotations.

pdfDoc.getForm().flatten();

What actually happened?

It removes the comments

What did you expect to happen?

To keep the comments and form fields intact after flattening

How can we reproduce the issue?

Version

1.17.1

What environment are you running pdf-lib in?

Node

Checklist

  • My report includes a Short, Self Contained, Correct (Compilable) Example.
  • I have attached all PDFs, images, and other files needed to run my SSCCE.

Additional Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions