最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Fill in a PDF Form - Stack Overflow

programmeradmin11浏览0评论

Hi I have a PDF form that needs to be filled in. The app asks questions to the users (form) and when it is submitted the answers should be filled into the PDF blank spaces for printing.

  • I'm familiar with JS and Node(haven't used in a while). Not using PHP.

  • I will host it at my usual place, Heroku.

  • I work on a windows 7 machine

Any tips would be great.

I did some research and wkhtmltopdf kept popping up. according to this it takes HTML pages and converts to PDF. So after the user answers I'll get the answers and make an html file that looks like the PDF with the provided answers filled in at the spaces. (don't know if that's that a good solution)

It says to download the wkhtmltopdf on your machine and run the HTML document through the tool sounds fun. but how will I host this tool on heroku. I was looking for NPM stuff and I found this. but it also says that "First, you need to install the wkhtmltopdf mand line tool on your system" the system is heroku right?

on wkhtmltopdf it says to use wkhtmltopdf google.pdf. Does that mean I need to have wkhtmltopdf on my system variables? so I could use it in my mand line.

PS : I know this is a big question so I'm willing to pay someone 30 dollars to help me work through this. I could do through paypal or something.

Hi I have a PDF form that needs to be filled in. The app asks questions to the users (form) and when it is submitted the answers should be filled into the PDF blank spaces for printing.

  • I'm familiar with JS and Node(haven't used in a while). Not using PHP.

  • I will host it at my usual place, Heroku.

  • I work on a windows 7 machine

Any tips would be great.

I did some research and wkhtmltopdf kept popping up. according to this it takes HTML pages and converts to PDF. So after the user answers I'll get the answers and make an html file that looks like the PDF with the provided answers filled in at the spaces. (don't know if that's that a good solution)

It says to download the wkhtmltopdf on your machine and run the HTML document through the tool sounds fun. but how will I host this tool on heroku. I was looking for NPM stuff and I found this. but it also says that "First, you need to install the wkhtmltopdf mand line tool on your system" the system is heroku right?

on wkhtmltopdf it says to use wkhtmltopdf http://google. google.pdf. Does that mean I need to have wkhtmltopdf on my system variables? so I could use it in my mand line.

PS : I know this is a big question so I'm willing to pay someone 30 dollars to help me work through this. I could do through paypal or something.

Share Improve this question asked Dec 31, 2015 at 3:22 jack blankjack blank 5,2357 gold badges45 silver badges75 bronze badges 1
  • This looks promising.... parall.ax/products/jspdf – jack blank Commented Dec 31, 2015 at 8:59
Add a ment  | 

2 Answers 2

Reset to default 2

I was working with html to pdf module , it is great , under the hood it uses phantomjs ( im not a expert at all but it is a good start for me) , i am able to use pdf as a stream or buffer i hope it could help you.

Check out the following modules on npm:

  • fill-pdf
  • pdffiller
  • pdf-fill-form
  • node-pdffiller
  • pdfkit

The node-pdffilleris a wrapper for PDFtk, the PDF Toolkit:

  • https://www.pdflabs./tools/pdftk-the-pdf-toolkit/

There's a lot of good documentation on the website of PDFKit:

  • http://pdfkit/

Those modules have different features and API. You should find something that suits your needs.

There's also a nice article:

  • Generating a PDF with Express & Node.js by Koen van Gilst (it uses PDFKit)
发布评论

评论列表(0)

  1. 暂无评论