dompdf libraries in fuel

edited August 2011 in News & Announcements
Hi,

I need some pdf in my application. Since I use CI for some time (http://codeigniter.com/wiki/PDF_generation_using_dompdf/) I was wondering if this can be inplemented in th fuel also ?

FI it needs a codeigniter plugin folder. What is the equiv in fuel or where can I find that folder.

Many thanks,
Tom

Comments

  • edited 1:02AM
    Plugins have been deprecated in CI 2.0. The recommendation is to create a helper instead or a Library.
  • edited 1:02AM
    tvdv
    I have used dompdf in my recent codeigniter 2.0 applications and the link you provided uses it as a helper. Follow the documentation on the wiki and it will work perfectly fine...Did for me!

    Roger
  • edited September 2011
    I tried using dompdf using CI 2 instructions. Works perfectly as a straight CI 2 program.

    In Fuel, the result nets me an error message "Unable to stream pdf: headers already sent" -- by fiddling, I know they were sent by core/Common.php

    Setting up the pdf needs access to the various models, etc. in Fuel, but it looks like I need to get the result out without Fuel getting to send headers. Any thoughts on how I would do this?
    === controller code is in application/controllers (fuel/application/controllers/my_controller.php)
    === dompdf_helper.php is in fuel/application/helpers (found successfully)

    the error appears to be generated when dompdf attempts to stream the output to the browser

    what I gave dompdf to play with was
    < html >< body >< h1 >Test< /h1 >< /body >< /html >

    BTW -- what is the right way to show html in this forum?

    Thanks!
  • edited 1:02AM
    Is there possibly a file (like the helper or library that is being loaded) that has a space after a closing php tag? That can sometimes cause a similar error I think.
    Use the HTML "code" tag for displaying code.
Sign In or Register to comment.