Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
A Warning with dompdf
  • Hi, I need help. I need to generate a pdf from the information generated in a view. I'm using dompdf and I'm getting the following message

    Warning!

    Fuel \ Core \ PhpErrorException [Warning]:
    A non-numeric value encountered
    PKGPATH // pdf / lib / dompdf / include / page_frame_decorator.cls.php @ line 473

    468 $ p = $ frame-> get_parent ();
    469 while ($ p) {
    $ 470 style = $ p-> get_style ();
    471 $ max_y + = $ style-> length_in_pt (array ($ style-> margin_bottom,
    472 $ style-> padding_bottom,
    473 $ style-> border_bottom_width));
    474 $ p = $ p-> get_parent ();
    475}
    476
    477
    478 // Check if $ frame flows off the page

    Could someone tell me how I can solve this problem? The call I made from the controller is the following:

    public function action_pdf ($ id = null) {

    $ inscription = Model_Inscripcion :: getInscripcionById ($ id);
    $ data ["insid"] = $ id;
    $ data ["date"] = date ("d / m / Y");
    $ data ["registration"] = $ registration;
    $ data ["anio"] = Model_Admin_Itemscatalogo :: getItem ('cat_desc_anios', $ inscription ['de_anio_inscribe']);
    $ data ["division"] = Model_Admin_Itemscatalog :: getItem ('cat_divisiones', $ inscripcion ['de_division']);


     $ view = View :: forge ('inscriptions / report', $ data, false);

    $ pdf = Pdf :: factory ('dompdf') -> init ();
    $ pdf-> set_paper ("A4", "portrait");
    $ pdf-> load_html ($ view);
    $ pdf-> render ();


    }
  • Never used DomPDF, so I can't comment.

    I think you need to figure out which variable is non-numeric, and why. Perhaps you are missing some setup code somewhere?

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion