how to change the dompdf orientation

Asked

Viewed 819 times

-1

how to change the dompdf orientation. Already include the following code, but it did not work

$dompdf->setPaper('A4', 'landscape');
  • 1

    This is the correct code. What’s going on? Doesn’t it change orientation? It generates some error?

  • 1

    figured out what it was, the position of the code. had put as below, but has to be reversed to work. $dompdf->render(); $dompdf->setPaper('A4', 'Landscape');

  • 1

    Got it! Cool!

1 answer

-1

In case I understand and it’s really trouble I’ve been through

  • $dompdf->setPaper('A4', 'Portrait'); //Portrait
  • $dompdf->setPaper('A4', 'Landscape'); //Landscape
  • Could you adjust your code for a better view? Here we use markdown.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.