Change Font-Size when export

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

Change Font-Size when export

Post by hemin »

is there a way to change font size when exporting to PDF or Excel/Word ?


Webmaster
User
Posts: 9427

Post by Webmaster »

If PDF, customize the ewpdf.css in the extension.

If Excel/Word (NOT PHPWord/Excel), you can use Page_Exporting server event (see Server Events and Client Scripts in help file) and add CSS styles for Word/Excel, e.g.

function Page_Exporting() {
	if ($this-Export == "excel") $this->ExportDoc->Text = "<style>td { font-size: 16px; }</style>"; // Insert style tag
	return TRUE; // Return TRUE to use default export and skip Row_Export event
}

Note that the final result depends on if Excel/Word can read your styles, so keep it simple.


philmills
User
Posts: 538

Post by philmills »

or just use heading tags <h1> <h2> etc


Post Reply