<div dir="ltr">fpdf will let you use an existing PDF as a background image.<div>here a snippet that could get better with a few refactors.</div><div>not sure how you're reading in the DOC# and DESC</div><div><br></div><div>#!/bin/someshell</div><div><br></div><div>cd to the dir</div><div>for files in `ls` {</div><div>  php this-script.php?FILE=$file&DOC=2&DESC=Spaces+Will+Be+A+Problem</div><div>}</div><div><br></div><?php <div>require_once('fpdf.php'); </div><div>require_once('fpdi.php'); </div><div><span style="font-family:'helvetica neue',helvetica,arial,sans-serif;line-height:20.7188px">//populate vars using GET<span class="inbox-Apple-converted-space"> </span></span><br style="font-family:'helvetica neue',helvetica,arial,sans-serif;line-height:20.7188px"></div><div>class PDF extends FPDI
{ </div><div>function Footer()
{ </div><div><span style="line-height:1.5"> $this->SetY(-15); </span><br></div><div><span style="line-height:1.5"> $this->SetFont('Arial','I',8); </span><br></div><div><span style="line-height:1.5"> $this->Cell(0,10,'Page '.$this->PageNo().$_GET[DOC].$GET[DESC],0,0,'C');</span><br></div><div> $this->ln(10); //adjust to taste</div><div><span style="font-family:'helvetica neue',helvetica,arial,sans-serif;line-height:20.7188px"> $this->Cell(0,10,$_GET[DOC].' -- '.$_GET[DESC],0,0,'C');</span> </div><div>} </div><div>}<br><br>
$pdf = new PDF();<br><br>$pageCount = $pdf->setSourceFile("friend-attorney-doc.pdf"); </div><div>$tplIdx = $pdf->importPage(1, '/MediaBox'); 
</div><div>$pdf->addPage(); </div><div>$pdf->useTemplate($tplIdx, 10, 10, 90); </div><div><span style="line-height:1.5">$pdf->Output($_GET[FILE].'-v2');</span><br></div><div><span style="line-height:1.5"><br></span></div><div><span style="line-height:1.5">?></span></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, May 6, 2016 at 10:28 AM L. V. Lammert <<a href="mailto:lvl@omnitec.net">lvl@omnitec.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Interesting question from a friend attorney, .. he wants to put a footer<br>
on a PDF document with case #, description, page x of n.<br>
<br>
Before I create a template in gimp [so it can be done semi-transparent],<br>
can anyone think of a better solution?<br>
<br>
Do NOT wish to edit the PDF, .. so LibreOffice or InkScape would not be<br>
desirable.<br>
<br>
        Thanks!<br>
<br>
        Lee<br>
<br>
_______________________________________________<br>
grlug mailing list<br>
<a href="mailto:grlug@grlug.org" target="_blank">grlug@grlug.org</a><br>
<a href="http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug" rel="noreferrer" target="_blank">http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug</a></blockquote></div><div dir="ltr">-- <br></div><div dir="ltr">🌿</div>