maroto icon indicating copy to clipboard operation
maroto copied to clipboard

WithMargins is missing bottom

Open oSethoum opened this issue 2 years ago • 5 comments

WithMargings function in the config builder is missing bottom config it should be WithMragins(left float64, top float64, right float64, bottom float64) Builder

oSethoum avatar Nov 15 '23 06:11 oSethoum

I searched on gofpdf, I didn't find a way to customiza the bottom margin of the document. This is why I didn't add this option to the builder.

johnfercher avatar Nov 16 '23 13:11 johnfercher

hey, I'm facing this too!

I'm just wondering if there's a way to maybe lower down the content of the footer a little bit? I saw the MinBottomMargin value being hardcoded so I've tried to lower down the value and the result was that the footer goes to the second page even though the first page isn't full yet.

Previously I used pure gofpdf with SetFooterFunc, but I think you have a specific reason why you didn't leverage that 🤔 .

cadoween avatar Nov 17 '23 06:11 cadoween

I hardcoded MinBottomMargin as the same value as gofpdf.

johnfercher avatar Nov 17 '23 11:11 johnfercher

I will have a deeper look to see what can be done.

johnfercher avatar Nov 17 '23 11:11 johnfercher

Out of curiosity, I took a look at gofpf and it seems like there is a way to override the bottom margin. The functionality is tied into setting the page break functionality as well: func (f *Fpdf) SetAutoPageBreak(auto bool, margin float64). It may be worth adding this setting to the config/internally using it in order to override the bottom margin.

GreatGodApollo avatar Jan 20 '24 18:01 GreatGodApollo

I will try this.

johnfercher avatar May 27 '24 23:05 johnfercher