How to generate the form?

Good day. How can I generate such a document from the data form? more precisely, the question is which way is better for yourself to make the forms(the output need PDF)? Usually their forms are done in Excel, but given the volume, it's half-life and very hardcoding will have, substituting the values in the cells.
Thought to layout, and then convert them to PDF, but turned out to be a problem with generating PDF in this layout(used mPDF)5c9ce1d54cde1027396067.png
March 19th 20 at 09:03
2 answers
March 19th 20 at 09:05
why PDF, when it is possible in SVG. Though of course there's a library jsPDFbut I don't like it.

here is a sample of the cells - quite simply get an array of letters and painted them with spacing:

https://rawgit.com/MrRio/jsPDF/master/
perfectly positioned in jsPDF and SVG
var doc = new jsPDF({
 orientation: 'p',
 unit: 'mm',
 format: 'a4'
})
var drawText = (doc,x,y,text,size)=>{
doc.setLineDash([0.2,0.3], 1);
doc.setLineWidth(0.1);
let w=text.length*size/3.7,h=size/2.6;
doc.line(x, y, x+w, y);
doc.line(x, y+h, x+w, y+h);
doc.line(x, y, x, y+h);
doc.setFont('courier');
doc.setFontType('normal');
doc.setFontSize(size);
text.split(").forEach((t,i)=>{doc.text(x+size/26+i*size/3.7, y+h-size/12,t);doc.line(x+(i+1)*size/3.7, y, x+(i+1)*size/3.7, y+h)})
};
drawText(doc,5,5,'1234567',50);
drawText(doc,5,30,'1234567',26);

documentation https://rawgit.com/MrRio/jsPDF/master/docs/index.html
5c9cf4ba19514369425030.png
I have no idea how to do that in jsPDF, given the poor functionality, I think this form is impossible. And what about SVG I don't know if it's real?) - Trevor.Kutch commented on March 19th 20 at 09:08
and what exactly is the problem? - myrtis.Howell commented on March 19th 20 at 09:11
don't even know worked little with SVG. Probably in these cells the whole problem, it is text position somehow - Trevor.Kutch commented on March 19th 20 at 09:14
you could have just wrote that I do not know in the text boxes displayed. Unfortunately the entire form me lazy to do it. - myrtis.Howell commented on March 19th 20 at 09:17
March 19th 20 at 09:07
Because the form template is constant, I have all the form would do a picture (background). And in "cells" inserted the necessary data from the web form with absolute positioning. This is the fastest and perhaps the correct way, maybe the process of converting HTML to PDF - the thing in itself.
as an option.. And what better way of converting HTML to PDF advise? all you care about - it turned out badly - Trevor.Kutch commented on March 19th 20 at 09:10
@Trevor.Kutch, if memory serves - phantomjs was able to save the page in pdf. - Travon commented on March 19th 20 at 09:13

Find more questions by tags HTMLJavaScriptPHP