Jump to content

Included TCPDF update breaks page size changes


brianr

Recommended Posts

(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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated