brianr Posted September 3, 2011 Share Posted September 3, 2011 (See also http://forum.whmcs.com/showthread.php?t=4528) An update to the bundled TCPDF library included a change that protect the setPageFormat function in the class. This means that it is not longer possible to change the PDF page size from within the invoicepdf.tpl file. The only workaround is to edit the includes/tcpdf.php file and edit the default page size from A4. Obviously this is not ideal and makes yet another file that has to be checked/edited with each update to WHMCS. Either allow the $pdf variable to be created in the invoicepdf.tpl file so we can set the page size in the constructor accordingly, or add a configuration option in WHMCS to allow us to specify the paper size. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted September 7, 2011 WHMCS CEO Share Posted September 7, 2011 TCPDF must have changed this on their side as this isn't something we've changed. But I'm sure we can look into changing it back if they don't. Matt 0 Quote Link to comment Share on other sites More sharing options...
brianr Posted September 8, 2011 Author Share Posted September 8, 2011 TCPDF must have changed this on their side as this isn't something we've changed. But I'm sure we can look into changing it back if they don't. They did - it's buried in the changelog. 5.0.012 (2010-05-19) - Page orientation bug was fixed. - The access to method setPageFormat() was changed to 'protected' because it is not intended to be directly called. That's a long way to revert back, I think we need some other way to handle this either by being able to call the TCPDF constructor in the include file, or to be able to set the page size in WHMCS. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.