Created
June 19, 2017 10:04
-
-
Save esimonetti/392a194495803085d679e7504c4040dc to your computer and use it in GitHub Desktop.
This is just an example of how to print all pdf templates of a module (Contacts) landscape instead of portrait.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Enrico Simonetti | |
// enricosimonetti.com | |
// | |
// 2017-06-19 on Sugar 7.9.0.0 | |
// filename: custom/modules/Contacts/sugarpdf/sugarpdf.pdfmanager.php | |
// | |
// This is just an example of how to print all pdf templates of a module (Contacts) landscape instead of portrait. | |
// After this customisation is installed, and the system is repaired, all PDF templates for Contacts will be printed landscape instead of portrait | |
require_once('include/Sugarpdf/sugarpdf/sugarpdf.pdfmanager.php'); | |
class ContactsSugarpdfPdfmanager extends SugarpdfPdfmanager | |
{ | |
public function preDisplay() | |
{ | |
parent::preDisplay(); | |
$this->setPageFormat(PDF_PAGE_FORMAT, 'L'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment