maroto icon indicating copy to clipboard operation
maroto copied to clipboard

Add support to change orientation of pages

Open KramKroc opened this issue 4 years ago • 4 comments

Is your feature request related to a problem? Please describe.

Pages like a cover and copyright could likely be aligned as portrait while data heavy tables may suit being added on a landscape page.

Describe the solution you'd like

I see there is an issue already raised to add a new page/page break. It would be useful if this were updated with optional field to indicate orientation.

Describe alternatives you've considered

KramKroc avatar Apr 16 '20 13:04 KramKroc

This would be set as page style on AddPage in maroto v2.

johnfercher avatar Sep 23 '23 18:09 johnfercher

Tried to implement this. But gofpdf doesn't support the change of page orientation after the creation of the gofpdf instance. A way to do that would be create a gofpdf instance to each orientation changing, run them and after merge the PDFs.

johnfercher avatar Oct 30 '23 13:10 johnfercher

@johnfercher Isn't that what AddPageFormat is for?

jerbob92 avatar Feb 09 '24 12:02 jerbob92

I will check it. I didn't know the existence of this method. Thank you

johnfercher avatar Feb 10 '24 22:02 johnfercher