Dom PDF isPHPEnabled killing styles

Viewed 27

I have a question regarding dompdf.

PDF::loadView('site.partner.policy.pdf.pdf-two', ['user' => Auth::user()])
            ->setOptions(['isPhpEnabled', true])->save($temp);

This should enable me to use a script, that enables a page number.


    <script type="text/php">
        if ( isset($pdf) ) {
            $x = 484.5;
            $y = 752.5;
            $text = "Seite {PAGE_NUM} von {PAGE_COUNT}";
            $font = $fontMetrics->get_font("Arial", "bold");
            $size = 8;
            $color = array(.502,.502,.502);
            $word_space = 0.0;  //  default
            $char_space = 0.0;  //  default
            $angle = 0.0;   //  default
            $pdf->page_text($x, $y, $text, $font, $size, $color, $word_space, $char_space, $angle);
        }
    </script>

This is the script, but all this does is killing my styles. I can't use the asset() function for pictures, the styles from my sccs are not taken and the option "isPhpenabled" true kills it.

Do you guys have any idea on what i might be able to do to fix it?

0 Answers
Related