Hello,

I am looking forward to find some help regarding the creation of thumbnails
from a modified pdf.

I use Zend_PDF to add some text and images to an existing pdf.
The way I use Zend is this:
$pdf = Zend_PDF::load(realpath($path));
$page = $pdf->pages[$page];
$font = getFont(); //here I load the Calibri.ttf or Eurostile.ttf e.g.
$page->setFont($font, $fontSize);
$page->drawText($tmp, $posx, $posY, "UTF-8");
$pdf->save($savePath);

After this I use GhostScript to generate thumbnails using the following:

gs -dBatch -dNOPAUSE -dSAFER -sDEVICE=png16m -r300 -dTextAlphaBits=4
-dGraphicsAlphaBits=4 -dFirstPage=1 -dLastPage=1
-sOutputFile=out/pdf_page1_thumbnail.png pdfs/pdf.pdf -c quit

The problem is, that in most cases the inserted text is in a different font
size or the letters are overlaying each other. The modified pdf documents
are good.

Here is a link that shows some generated thumbnails:
https://printportal.la-well.de/thumbs.php

I dont know if I am in the right place here. Please let me know, if you have
any hints or solutions to it.

Regards

student




-- 
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Crappy-Thumbnails-from-generated-pdf-tp3329564p3329564.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to