Answer the question
In order to leave comments, you need to log in
How to generate a table with summary headers and footers?
The essence of the task: the generation of a waybill, it is necessary that on each page the headings of the table and the amount for each page be repeated from the bottom.
If repeating headers are easy to make, then the bottom part is more difficult.
I would like to use Wkhtmltopdf, but I do not see a solution on it (
Who can suggest a simple and correct solution?
Answer the question
In order to leave comments, you need to log in
What's the problem? If you have waybills generated automatically from some php script, then make the appropriate calls to generate headers and footers.
For example:
wkhtmltopdf --margin-top 35mm --margin-bottom 27mm \
--margin-left 10m --margin-right 10mm \
--header-html <путь,имя шапки.php> \
--footer-html <путь,имя подвала.php?параметр=значение> \
<путь,имя исходного файла.php?параметр=значение> \
<путь, имя выходного файла.pdf>
$pdffile = "Filename.pdf";
$pagecount = $pdf->setSourceFile($pdffile);
for($i=0; $i<$pagecount; $i++){
$pdf->AddPage();
$tplidx = $pdf->importPage($i+1, '/MediaBox');
$pdf->useTemplate($tplidx, 10, 10, 200);
}
gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite \
-sOutputFile=<имя конечного файла.pdf> \
<файл1.pdf> <файл2.pdf> <файл3.pdf> <...> <файлN.pdf>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question