当前位置: 动力学知识库 > 问答 > 编程问答 >

javascript - Web application to grab user input and create PDF

问题描述:

I am creating a web application that users can upload clients information and it will streamline a finalized professional drafted pdf document.

The document will have set static text, but it also needs to grab the clients answers they provide and combine this information into the final document.

I can handle the php, javascript, css, html and server side but I have no clue how to pull the information provided and add it to a document and create the pdf.... Please help

Here is the full picture in case I have not explain my needs above clearly.

In our business we have to create loss run request to send to carriers. The request form is like any structured document... heading, subject, body paragraph, and signature at the bottom.

I want to have a set template that includes all the static document words.

There will be about 5 areas that will need to pull information that the user provided. The text must then go to the document, with same style, text, font, size etc.. And automatically create the pdf on request.

网友答案:

You probably should use a html <form>(you can learn more about those here for example) if i understand your question correctly. Then you can use the informations provided to create your PDF file via a library like jsPDF for example, which should be quite easy. Keep in mind though that jsPDF is a client side library (a javascript one in this case), which means that everything will be executed by your users'browser. If you want a server side approach, with PHP for example which can give you more options, you should probably use FPDF as suggested by icecub in the comments.

分享给朋友:
您可能感兴趣的文章:
随机阅读: