Rename the form fields #1633
Unanswered
Arun-kumar002
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
// I'm trying to rename form fields using field.acroField.setPartialName
fields.forEach(field => {
const originalName = field.getName();
const newFieldName =
page_${pageNumber}_${originalName}
;field.acroField.setPartialName(newFieldName);
});
// After the update, I am not able to read the form fields' values
const fields = form.getFields();
console.log(fields); // []
The scenario is: I have a table in my PDF. After clicking on "New Page," I need to add a duplicate of the page below the current one.
Beta Was this translation helpful? Give feedback.
All reactions