Reports on Legal sized paper (8.5 in x 14 in)

Hello to all. Let me first add my thanks for your efforts in releasing Gibbon to society as free/libre software. I have been experimenting with various aspects of Gibbon (both v24.0.01 and the code at github) to determine if it would be suitable for a school in Trinidad and Tobago. Thus far, it seems to have attractive features which would be useful to our school.

I am in the process of editing some templates for reporting. I would like the option to put reports on legal sized pages. It would be nice, even necessary, to have some more real estate on the page.

The interface only gives the options of A4 and US Letter sized pages. So my guess is that it may require some programming to add the Legal sized page option. I am a programmer, so I may be able to implement this with guidance around the code base.

Thank you in advance for your suggestions.

Hi olivierdevon, welcome to the Gibbon community and thanks for your kind words :smiley: Great to hear you’re looking to set it up for a school in Trinidad and Tobago.

Yes, this should be something that’s supported by both the TCPDF and mPDF rendering libraries that the Reports module uses, it’s likely a matter of adding it as an option to the paper size drop-down and then testing it out with both renderers to see that it’s being handled correctly. I’d be happy to point you in the right direction if you’re interested in having a look at making this type of change.

The dropdown options can be found in:

Then check to see how they’re handled in the renderers in the setupDocument methods:

Perhaps also check the docs of the two libraries to see if they use the same or different parameter value for page size.

Hope this helps get you up and running!

Thank you for your response. I will look into this, hopefully soon.

I think I succeeded in making the necessary changes to allow for Legal page sizes. I just came back to thank you again and to add that


may have to be edited as well.

Also, for me the TCPDF Renderer did not recognize the ‘US Letter’ option. I made a pull request that I think is a fix.

With gratitude,

Olivier, Devon