Hello,

I'm experimenting with using dompdf in a Joomla component and I'm yet to find a clean way to get my component's HTML output out there as PDF (I'm working with MVC). My first approach was to:

- use format=dompdf as GET param
- put a full html structure in the view template
- render as pdf directly in my JView extension

Problem is that I won't benefit from any plugins modifying content (in worst case, plugin output will mix with the PDF content in the buffer).

I'm thinking of making a plugin that takes the document buffer onAfterRender, but I wonder if there is a clean way to add a subclass of JDocument to the Joomla library folder.

Views: 174

Replies to This Discussion

Thank you Nicolas for the piece. I know plugins and how they work and I really like what you can do with it. I didn't know that you can detach observers, that seems very useful in case you need to prevent plugins from doing their business.

RSS

Badge

Loading…

© 2012   Created by Amy Stephen.

Badges  |  Report an Issue  |  Terms of Service