Cannot change Export PDF pagesize

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
marisoft
User
Posts: 209

Cannot change Export PDF pagesize

Post by marisoft »

Hi,

Export to PDF renders in letter portrait no matter that a4 portrait is selected like this:

In table_info.php - function __construct:
$this->ExportPageOrientation = "portrait"; // Page orientation (PDF only)
$this->ExportPageSize = "a4"; // Page size (PDF only)

in phpfn10.php - function Export():
global $gsExportFile;
include_once "dompdf060b3/dompdf_config.inc.php";
@ini_set("memory_limit", EW_PDF_MEMORY_LIMIT);
set_time_limit(EW_PDF_TIME_LIMIT);
$dompdf = new DOMPDF();
$dompdf->load_html($this->Text);
$dompdf->set_paper($this->Table->ExportPageSize, $this->Table->ExportPageOrientation);
$dompdf->render();

Any ideas how to solve this ?

tia

/Poul


danielc
User
Posts: 1601

Post by danielc »

Enable [Tools]->[Extensions]->[DOMPDF] and click [Advanced] and then [Tables], you can setup your PageOrientation as portrait. See Tools in help file.

Or change in program, just change this in table_info.php - function __construct:
$this->ExportPageOrientation = "portrait"; // Page orientation (PDF only)

No need to modify function export().


marisoft
User
Posts: 209

Post by marisoft »

Thanks danielc, but the DOMPDF extension has been set exactly like that, and table_info.php is being generated accordingly.

But it doesn't work like that when the pdf is generated :-(

/Poul


danielc
User
Posts: 1601

Post by danielc »

I try different letter size setting in dompdf, A4 and letter (Pdfbackend: CPDF). After regenerating the files, open the file in adobe reader (the page size is correct). You may post your complete DOMPDF setup.


Post Reply