orkestra / OrkestraPdfBundle

Provides a uniform API for generating PDFs using wkhtmltopdf, tcpdf and zend pdf
MIT License
2 stars 2 forks source link

How to use this bundle example #1

Closed davidromani closed 11 years ago

davidromani commented 11 years ago

Hello,

Can you write an example about how to use this bundle, please? It would be interesting see how can I get this service inside a controller and generate the response with a PDF attached file.

README.md seems to be a good place to put the example.

Thank you very much.

tyler-sommer commented 11 years ago

Thanks for the interest!

You're right, we need to get some documentation. I've just pushed an update to the README on the develop branch 062f772 with an example. Right now, however, develop is very unstable -- I'll work on that so I can tag 1.0

davidromani commented 11 years ago

Thank you.

I follow the latest documentation but I get an config.yml file error with %orkestra.pdf.tcpdf.root_dir% keyword:

[Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException] You have requested a non-existent parameter "orkestra.pdf.tcpdf.root_dir".

I installed this bundle with the composer require "orkestra/pdf-bundle 1.0.x-dev" option and then I added "tecnick.com/tcpdf": "dev-master" option to composer.json file. Finally I have passed all of the tests of your bundle (except for ZendPdfFactoryTest, obviously, because I don't have this library installed)

Can you fix this mess with the config parameters?.

tyler-sommer commented 11 years ago

Thank you for taking another look at the bundle!

I've clarified the Configuration section, which I think was incorrect before.

davidromani commented 11 years ago

Great. It works!