melvnberd
melvnberd

Reputation: 3163

dompdf not rendering properly on display:inline-block

Good Day,

I am trying to render a calendar to pdf using dompdf,

heres my html

and my php

<?php
// require .'vendor/dompdf/autoload.inc.php';
require("vendor/dompdf/autoload.inc.php"); 

use Dompdf\Dompdf;

    // Instantiate and use the dompdf class
    $dompdf = new Dompdf();

    // Load HTML content
    $dompdf->loadHtml($_REQUEST['html']);

    // (Optional) Setup the paper size and orientation
    $dompdf->setPaper('LETTER', 'portrait');

    // Render the HTML as PDF
    $dompdf->render();

    // Output the generated PDF to Browser
    $dompdf->stream();
?>

the html is is good I think, just without head and html tag.

and heres the result.

can you please help me figure what wrong? the html displays fine on browser too. enter image description here

Upvotes: 0

Views: 4681

Answers (1)

Giri
Giri

Reputation: 565

Might be too late to this answer, but anyone looking for this issue, please try display: inline, it solves this issue but still need to specify width and height and not auto calculate.

Upvotes: 1

Related Questions