Using JavaScript to remove generated page footer text
I've written a basic script that does some adjustments to a PDF generated via HTML, such as renaming and formatting fields, setting the doc title, etc., and am looking to extend it to remove the generated footer text on each page, but cannot figure out how to achieve this.
Every page's footer is generated similar to 'file:///C/PDFs/Html%20Templates/new_form.html[9/27/2024 10:38:40 AM]'. I can edit and remove this manually, but I'd like for the script to achieve the same. Is it possible to access and remove these text fields through the script, or am I out of luck?
function trimFields(formTitle = "", verbose = false) {
console.println("Starting trimFields...");
if (formTitle) {
this.title = formTitle;
console.println("Form title set to " + this.title);
}
// Copy originals so as to not iterate the array while changing it
var originalFields = [];
for (var i = 0; i < this.numFields; i++) {
originalFields.push(this.getNthFieldName(i));
}
// .. omitted for brevity
}
