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

Anchor tags in running footer render content OK, but hotspot seems to be at top of page #213

Closed
markhowardnz opened this issue Apr 21, 2018 · 2 comments

Comments

@markhowardnz
Copy link

markhowardnz commented Apr 21, 2018

I'm wanting to generate a PDF with some company branding information in the footer of each page, including a link to our website. I'm using a running element for the footer.

If I add an <a href="...."> tag within the footer, the actual content of the tag is rendered just fine, and the link text appears in the footer of each page, as expected.

However, the actual clickable "hotspot" of the anchor tag is not "over" the link. The X position seems correct, but the Y position appears to have been reset to 0 (ie the top of the page).

For an example, see the attached test case. You'll see that the footer link in the @bottom-center part of the page renders fine, including with a border around the element, all as expected. However, that link is not clickable - if you move your mouse up to the top of the content area (the lorem ipsum), you'll see the actual hotspot for that <a> tag is misplaced - it's right at the top of the content, in the middle of the first line of body copy.

misplaced-links-in-footer.txt

danfickle added a commit that referenced this issue Apr 22, 2018
Also fix a NPE in BlockBox related to recent work on replaced elements.
@danfickle
Copy link
Owner

Hi @markhowardnz

I've just pushed correcting code. The problem was that we hadn't considered links in the margin areas. I also found another (unfixed) problem. Links containing only an image will not be rendered unless the surrounding link is marked display:inline-block or anything other than inline. It's a bug, but because the workaround is so simple, low priority to fix.

Thanks for your detailed test-case. It made it relatively easier to find and fix the problem.

I'm planning on doing a release in about a week.

@markhowardnz
Copy link
Author

Hi Dan

Wow, that was quick! My team and I very much appreciate your work on this project, and especially your speedy fix.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants