Home > Net >  Fill out pre-existing PDF document with Javascript, NodeJS
Fill out pre-existing PDF document with Javascript, NodeJS

Time:12-13

I have a project where I want to fill out a taxform programmatically. I'm building a React application. The PDF is already existing and I downloaded it to my computer. I want to find some NodeJS library or other solution to fill the document with information. I dont want to make a new PDF. All I want to do is fill in different places of the tax agencys pdf form.

I have looked through this thread: Fill Data In Existing PDF Form Using NodeJS

But find it hard to get a definitive answer as to what is the best approach, several of the librarys mentioned in that thread are not a viable option in 2021 it seems.

Anyone out there with a good recommendation? As I said, I dont want to make my own PDF or anything fancy. I just want to fill out a pre existing PDF which I got from the tax agencys website. Thanks!

EDIT: I tried node package pdf-fill-form. Couldn't install it.

CodePudding user response:

If it is "just for you", the easiest approach would be creating an FDF for the forms, and use Acrobat (Reader) to do the filling and rendering.

This would relief you from dealing with the actual PDF file.

CodePudding user response:

I solved this by converting the pdf to a jpg and writing html code on it to fill it out. Planing to convert the html view to a downloadable pdf further down the line. Hopefully this will work.

  • Related