I am using php pdftk to take data out of a mysql database and put it in a bunch of different fields on a PDF. My issue is a few of the fields potentially have long text however instead of then showing an up/down scroll bar or even being able to scroll up or down to read all the text it seems to just get cutoff. I am wondering if there is a specific pdftk tag or something I should use to ensure if the field has multiple rows that I can see a scroll bar to scroll up and down to ready all that would be entered in.
Here is how the pdf looks. when I load it via an iframe in the browser notice the textarea labeled HPI as multiple rows of text but no scroll bar or indication you can scroll up or down.
However if I open the template pdf file in adobe and type a bunch into that field see screenshot below you can then see a up/down scroll bar in the field labeled HPI
Here is the code
namespace Classes;
use mikehaertl\pdftk\Pdf;
class GeneratePDF {
public function generate($data, $patientid)
{
try {
$filename = "$patientid.pdf";
$pdf = new Pdf('./imports/the_template.pdf');
$pdf->fillForm($data)
->saveAs( './imports/generated_consults/' . $filename);
//->send( $filename . '.pdf');
return $filename;
}
catch(Exception $e)
{
return $e->getMessage();
}
}
}