Whenever I encounter input fields in a pdf file, I attempt to use pdf js to interact with them. However, I have been facing challenges in doing so.
Allow me to provide an example of my objective:
const canvas = document.getElementById(`canvas-${this.pageNumber}`);
const context = canvas.getContext("2d");
const dis = this;
this.fabricObj = fabric;
const scale = this.scale;
const viewport = page.getViewport(scale);
canvas.height = viewport.height;
canvas.width = viewport.width;
var formFields = {};
page.render({
canvasContext: context,
viewport
})
.promise.then(() => {})
I am curious if it is feasible to treat a pdf input field as a regular input field?