Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AlternatedBackground doesn't work with custom top margin #137

Closed
johnferchermeli opened this issue Feb 19, 2020 · 0 comments · Fixed by #138
Closed

AlternatedBackground doesn't work with custom top margin #137

johnferchermeli opened this issue Feb 19, 2020 · 0 comments · Fixed by #138
Labels
bug Something isn't working

Comments

@johnferchermeli
Copy link
Contributor

johnferchermeli commented Feb 19, 2020

Describe the bug
When defined a custom top page margin, the alternated background doesn't consider the new value in the y offset and doesn't fill the background correctly. This is a limitation from CellFormat.

Related code:

m := pdf.NewMaroto(consts.Portrait, consts.A4)
m.SetPageMargins(10, 15, 10)

m.TableList(headerSmall, smallContent, props.TableList{
	AlternatedBackground: &color.Color{
		Red:   200,
		Green: 200,
		Blue:  200,
	},
})

Expected behavior

  • The alternated background should fill the background correctly, considering the new top margin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant