[symfony-users] Re: WkHtmlToPdf in Symfony

2010-11-17 Thread ming
Do you have tried SnappyBundle on Symfony2? It give me this error: Undefined property: appDevDebugProjectContainer::$snappyPdf Probably I've missed some configuration parameters or setted it wrongs. I've downloaded and placed Snappy php5 lib on src/vendor dir as reported in the Requirements

[symfony-users] Re: WkHtmlToPdf in Symfony

2010-11-17 Thread Florian
Seems like a DIC configuration problem. You should open app/cache/dev/appDevDebugProjectContainer.php at line mentionned and watch. Maybe your app/config/config.yml doesn't load the extension: snappy.image: ~ snappy.pdf: ~ Try to add these two lines in your config and see. On Nov 17, 5:11 pm,

[symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-28 Thread fxsymfony
Hey Florian thanks for the help. I have Snappy up and running in Symfony 1.4 following the steps you described. The only difference is that I save the temp html files in the web folder so that they can access the images and css (I'm planning on having them erased with a script afterwards). It

[symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-27 Thread Florian
you can pass extra parameters like this: $request-setParameter('id', 1); On 26 oct, 21:48, ming minga...@gmail.com wrote: On 26 Ott, 15:26, Florian sideral.undergro...@gmail.com wrote: In order to get the html result of the action execution, yoi can use another solution(, which is a

[symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-26 Thread Florian
Hi, you can use local html file too : $snappy-save('file:///tmp/file.html', '/tmp/my.pdf'); or $snappy-save('./file.html', '/tmp/my.pdf'); This way, you have no more problems of http/cookie credentials :) For the images problem, you have to give either an absolute path or run your script

[symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-26 Thread Florian
In order to get the html result of the action execution, yoi can use another solution(, which is a way better than the file_get_contents solution mentionned here: http://www.symfonyexperts.com/question/show/id/141 ) in your action: $html = $this-getController()-getPresentattionFor('module',

[symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-26 Thread ken
Or echo passthru('/usr/bin/wkhtmltopdf http://google.com/ -'); On Oct 26, 9:26 pm, Florian sideral.undergro...@gmail.com wrote: In order to get the html result of the action execution, yoi can use another solution(, which is a way better than the file_get_contents solution mentionned

[symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-26 Thread ming
On 26 Ott, 15:26, Florian sideral.undergro...@gmail.com wrote: In order to get the html result of the action execution, yoi can use another solution(, which is a way better than the file_get_contents solution mentionned here:http://www.symfonyexperts.com/question/show/id/141 ) in your

[symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-25 Thread fxsymfony
I haven't tried Snappy yet as we almost have the original script working (it generates the pdf's but the images in subfolders are not shown). @min: I will come into that same problem soon, I haven't got into it yet but I was planning on passing the full html from the action directly into

[symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-23 Thread ming
On Oct 22, 9:29 am, Florian sideral.undergro...@gmail.com wrote: Rectification: $snappy = new SnappyPdf; $snappy-setExecutable('/usr/bin/wkhtml2pdf'); // or whatever else $snappy-save('http://google.fr', '/tmp/google.pdf'); Your code work right, but how I can retrieve a page that required

[symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-22 Thread fxsymfony
Hi Florian, It works ok from the command line, for example if I type: wkhtmltopdf-i386 http://google.com google.pdf it does create the google.pdf file. On the other hand, that Snappy lib seems interesting, I don't know how to use it though, it would be great if they had a very simple working

[symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-22 Thread Florian
I think you should use Snappy, it seems better written than the integrationWithPHP example. I didn't tested, but I would try this: $snappy = new SnappyPdf; $snappy-save('http://google.fr', '/tmp/google.pdf'); Read

[symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-22 Thread Florian
Rectification: $snappy = new SnappyPdf; $snappy-setExecutable('/usr/bin/wkhtml2pdf'); // or whatever else $snappy-save('http://google.fr', '/tmp/google.pdf'); On Oct 22, 9:26 am, Florian sideral.undergro...@gmail.com wrote: I think you should use Snappy, it seems better written than the

[symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-22 Thread fxsymfony
From the command line it works perfectly, if I type for example: wkhtmltopdf-i386 http://google.com google.pdf It creates google.pdf with the file... On the other hand, the Snappy lib you mentioned seems interesting, I couldn't figure out how to use it though, it would be great if they had a

Re: [symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-21 Thread Florian
Hi, try your wkhtml2pdf from the command line first. Didn't used the lib before, so i'm not sure. but as i read the code, it seems to come from an error of the command line. Le 20/10/2010 14:03, fxsymfony a écrit : Hi Florian, Im using Symfony 1.4. Still having been able to get it to

[symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-20 Thread fxsymfony
Hi Florian, Im using Symfony 1.4. Still having been able to get it to work, I'm using this php script: http://code.google.com/p/wkhtmltopdf/wiki/IntegrationWithPhp and I get the following error: Fatal error: Uncaught exception 'Exception' with message 'WKPDF shell error, return code 2.'

[symfony-users] Re: WkHtmlToPdf in Symfony

2010-10-19 Thread Florian
Hi, If you're talking of Symfony2, there is a bundle for that : http://symfony2bundles.org/knplabs/SnappyBundle It uses the Snappy php5 lib, which is a wrapper for wkhtml2pdf. http://github.com/knplabs/snappy On 19 oct, 09:03, fxsymfony fari...@gmail.com wrote: Has anyone used WkHtmlToPdf in