Well thanks for your answer.
Facing the linebreaks wasnt that hard. Its already been done. Maybe I 
have a post on the GhostScripts forum.

Another problem is a mess with pictures converted to cmyk.
When I got an image (mainly jpg) it uses RGB colors in most cases. Due 
to the printers I have to convert them to cmyk using ImageMagick. The 
converted images look pretty good but a bit more bright. I think it is a 
typically loss of Qualtity during conversion. But when I insert it to a 
pdf it looks like an negative image from old cameras of the 90s...
The insertation is done as followes:
$img = Zend_Pdf_Image::imageWithPath($imgCmyk);
$page->drawImage($img, $left, $bottom, $right, $top);

This problem occured 10 min ago. That is why this question comes so late.

Regards and thanks

student

Am 01.03.2011 15:19, schrieb Jonathan Maron [via Zend Framework Community]:
> Hello Student
>
> The formats that LiveDocx supports are listed here:
>
> http://www.phplivedocx.org/2009/01/12/supported-file-formats-in-phplivedocx/
>
> Unfortunately, it does not support Scribus.
>
> Writing text into a PDF file is always tricky, as your programming
> logic has to calculate where to break lines etc. This can get very
> time consuming.
>
> I do not know whether you are able to get your customers to produce
> templates in one of the word processing file formats that LiveDocx
> supports, but if you can, your task of populating the templates would
> be much easier.
>
> I personally am not familiar with the inner working of the Scribus
> format, hence, I cannot say whether it is possible to manipulate the
> source files, either directly or via the CLI.
>
> Can anyone else shed some light on this?
>
> Best regards
>
> Jonathan Maron
>
> On Tue, Mar 1, 2011 at 2:33 PM, student <[hidden email] 
> </user/SendEmail.jtp?type=node&node=3329918&i=0>> wrote:
>
> > Hello Jonathan,
> >
> > I had a look at this.
> > The templates we fill with customer data are produced using scribus
> > (http://www.scribus.net/).
> > In particular I would prefer to manipulate the Scribus Source fiels. 
> But
> > unfortunately Scribus isnt able to be invoked via commandline on 
> server.
> > So the only way is to write the data as text into an existing pdf for
> > the moment.
> > Or am I wrong?
> >
> > Regards student
> >
> > Am 01.03.2011 13:15, schrieb Jonathan Maron [via Zend Framework 
> Community]:
> >> Hello Student
> >>
> >> Looking at the sample code that you provide, it looks like you are
> >> doing some basic mail merge.
> >>
> >> You can certainly use Zend_Pdf for this.
> >>
> >> However, there is another component, Zend_Service_LiveDocx_MailMerge,
> >> which offers a really easy way to populate templates, created in a
> >> word processing WYSIWYG package (for example, MS Word) directly in
> >> PHP, using the Zend Framework.
> >>
> >> The idea is simple:
> >>
> >> 1) You make a template in MS Word (for example).
> >> 2) In this template, you add so called "merge fields".
> >> 3) Using only a few lines of code, you populate the merge fields in
> >> the template.
> >> 4) You then save the document to PDF (or any other supported format).
> >>
> >> Using this approach would be particularly advantageous to you, as you
> >> can also save the document to image files (PNG, GIF, JPG etc.) --
> >> perfect for the thumbnails that you need. You can specify the size of
> >> the resulting images files via the API.
> >>
> >> The documentation is here:
> >>
> >> http://framework.zend.com/manual/en/zend.service.livedocx.html
> >>
> >> Additionally, I run a blog dedicated to the component at:
> >>
> >> http://www.phplivedocx.org
> >>
> >> Which contains a number of sample applications.
> >>
> >> Getting started guide:
> >>
> >> 
> http://www.phplivedocx.org/articles/getting-started-with-phplivedocx-zf/
> >>
> >> Very simple sample applications:
> >>
> >> http://www.phplivedocx.org/articles/brief-introduction-to-phplivedocx/
> >>
> >> List of supported formats:
> >>
> >> 
> http://www.phplivedocx.org/2009/01/12/supported-file-formats-in-phplivedocx/
> >>
> >> You may also be interested in a session that I held at PHP
> >> Unconference Europe a couple of weeks ago:
> >>
> >> 
> http://www.phplivedocx.org/2011/02/19/slides-from-php-unconference-europe-2011/
> >>
> >> If you have any questions, please do not hesitate to ask me.
> >>
> >> Best regards
> >>
> >> Jonathan Maron
> >>
> >>
> >>
> >> On Tue, Mar 1, 2011 at 11:18 AM, student <[hidden email]
> >> </user/SendEmail.jtp?type=node&node=3329701&i=0>> wrote:
> >>
> >> > 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
>  
> <http://zend-framework-community.634137.n4.nabble.com/Crappy-Thumbnails-from-generated-pdf-tp3329564p3329564.html?by-user=t>
> >> 
> <http://zend-framework-community.634137.n4.nabble.com/Crappy-Thumbnails-from-generated-pdf-tp3329564p3329564.html?by-user=t
>  
> <http://zend-framework-community.634137.n4.nabble.com/Crappy-Thumbnails-from-generated-pdf-tp3329564p3329564.html?by-user=t&by-user=t>>
>  
>
> >> > Sent from the Zend Framework mailing list archive at Nabble.com.
> >> >
> >>
> >>
> >> 
> ------------------------------------------------------------------------
> >> If you reply to this email, your message will be added to the
> >> discussion below:
> >> 
> http://zend-framework-community.634137.n4.nabble.com/Crappy-Thumbnails-from-generated-pdf-tp3329564p3329701.html
>  
> <http://zend-framework-community.634137.n4.nabble.com/Crappy-Thumbnails-from-generated-pdf-tp3329564p3329701.html?by-user=t>
> >>
> >> To unsubscribe from Crappy Thumbnails from generated pdf, click here
> >> 
> <http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3329564&code=cmlmZmVydEBsYS13ZWxsLmRlfDMzMjk1NjR8LTIwNjU4MjgwNjE=
>  
> <http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3329564&code=cmlmZmVydEBsYS13ZWxsLmRlfDMzMjk1NjR8LTIwNjU4MjgwNjE=&by-user=t>>.
>  
>
> >>
> >
> >
> > --
> > View this message in context: 
> http://zend-framework-community.634137.n4.nabble.com/Crappy-Thumbnails-from-generated-pdf-tp3329564p3329824.html
>  
> <http://zend-framework-community.634137.n4.nabble.com/Crappy-Thumbnails-from-generated-pdf-tp3329564p3329824.html?by-user=t>
> > Sent from the Zend Framework mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the 
> discussion below:
> http://zend-framework-community.634137.n4.nabble.com/Crappy-Thumbnails-from-generated-pdf-tp3329564p3329918.html
>  
>
> To unsubscribe from Crappy Thumbnails from generated pdf, click here 
> <http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=3329564&code=cmlmZmVydEBsYS13ZWxsLmRlfDMzMjk1NjR8LTIwNjU4MjgwNjE=>.
>  
>


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

Reply via email to