I've a pdf file of a rule that need to pass a several approval. In the end of the file (content), I need to:
Is that possible?
TCPDF writeHtml
will place the generated html in the top of the page, while writeHTMLCell
and MultiCell
will need a specific x
and y
to be defined.
I'm also trying in MPDF, but it stuck like the TCPDF.
The code before writing the html looks like this,
$pageCount = PDF::setSourceFile($file);
$template = PDF::importPage($i);
$size = PDF::getTemplateSize($template);
PDF::AddPage($size['orientation'], array($size['width'], $size['height']));
PDF::useTemplate($template);
// After this, I need to call writeHtml, writeHTMLCell, or MultiCell, but none of those met what I need.
// Or placing an image with PDF::Image also need to define the x and y
...
// PDF::SetX()
// PDF::SetY()
// PDF::Image($qrPath, null, null, 12, 12, 'PNG');
// PDF::WriteHTML(view('document-requests.approver.stamp', ['qr' => $qrPath]), true, false, true, false, '');
PDF::Output($file, 'F');
#Edit
Another thing from mPDF
is that there's an Overwrite
method, but it's only overwrite the content created/generated by the library itself.
Stuck for looking an automated way, I use a Client Side approach, and written the full way here. But for a glance, the steps are:
The results so far have been good