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

Footer spacing wrong and overridden/set by header spacing #1988

Closed
alito opened this Issue Oct 8, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@alito

alito commented Oct 8, 2014

This is against 2b18ad3, latest as of today. The --footer-spacing does not act like described. It seems to be in practice set by the --header-spacing parameter.

eg tester.html:

<!DOCTYPE HTML>
<html>
<body>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
<p style="margin-top:2cm;margin-bottom:2cm">Some content</p>
</body>
</html>

header.html:

<!DOCTYPE HTML>
<html>
<body>
<p style="margin-top:2cm;margin-bottom:2cm">The header</p>
</body>
</html>

footer.html:

<!DOCTYPE HTML>
<html>
<body>
<p style="margin-top:2cm;margin-bottom:2cm">The footer</p>
</body>
</html>

wkhtmltopdf tester.html --header-html header.html --header-spacing 60 --footer-html footer.html out2.pdf

(I am using 60 spacing to make the effect clear) You can see that the footer is very high up, reflecting the spacing given to header-spacing.

wkhtmltopdf tester.html --header-html header.html --header-spacing 60 --footer-html footer.html --footer-spacing 10 out3.pdf

Even if a smaller footer-spacing is specified, it is ignored. The large one is used.

wkhtmltopdf tester.html --header-html header.html --footer-html footer.html --footer-spacing 60 out4.pdf

A footer-spacing without a header-spacing hides the footer (?)

@alito

This comment has been minimized.

alito commented Oct 8, 2014

Images for previews comment (I thought I'd be able to upload the pdfs)

out2:
out2

out3:

out3

out4:

out4

ashkulz added a commit that referenced this issue Oct 22, 2014

@ashkulz ashkulz added the Fixed label Oct 22, 2014

@ashkulz ashkulz added this to the 0.12.2 milestone Oct 22, 2014

@ashkulz

This comment has been minimized.

Member

ashkulz commented Nov 7, 2014

A snapshot build (0.12.2-dev-85cdf36) is available which includes the fix for this issue.

@ashkulz

This comment has been minimized.

Member

ashkulz commented Jan 10, 2015

0.12.2 has been released, which includes changes related to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment