PDF landscape format

Help me please, how make format to document and other “paper” format “pdf” make a4 landscape (horisontal orientation)?
In this forum very little information. Sorry my wrong lang. Thanks.

Hi Igor,

Currently this has to be done in the code. What you do is find this file:


and this one for the generate letter functionality


Find this line in those files:

$pdf=new mPDF(‘en’,‘A4’,’’,‘DejaVuSansCondensed’,$template->margin_left,$template->margin_right,$template->margin_top,$template->margin_bottom,$template->margin_header,$template->margin_footer);

And change the second parameter where is says A4 to A4-L and this will change it to landscape.

The above changes wont be upgrade safe but since it is such a minor change you can just manually change it again if you upgrade.

Hope this helps.

1 Like

How would one set this up in the template file itself at a code level so that this feature is not global and if not possible can this feature of landscape be set up to work in one module only and not all?

Use Case: We have a class Attendees module in which we would like to print out certificates in landscape based on the information in the module, however, we want to print Quotes and Invoices in portrait, not landscape.

Any direction would be welcome.

Thank you

Hi, i know it’s an old thread but for new visitors, i’d like to highlight that we, Lion Solution as SuiteCRM partner, developed and gave to the community as little contribution to the SuiteCRM project an addon that does it:

If you want to download it from the Labs and use it, you’re most welcome!

You could set the “Landscape” format in each Report. By the way: it’s upgrade safe.

We tested it on version 7.10.14 and 7.10.27
If you could give us any feedback about compatibility with other versions, it would be fantastic.