Skip to content
This repository has been archived by the owner on Jan 2, 2023. It is now read-only.

Link not coming as clickable in generated pdf. #5004

Open
rajeshkr7 opened this issue May 12, 2021 · 7 comments
Open

Link not coming as clickable in generated pdf. #5004

rajeshkr7 opened this issue May 12, 2021 · 7 comments

Comments

@rajeshkr7
Copy link

rajeshkr7 commented May 12, 2021

wkhtmltopdf version(s) affected: 0.12.6

OS information

Ubuntu 18.04.5 LTS (Bionic Beaver)

Description

IF any I am using any link in it not working or showing like a link in PDF.

How to reproduce

<table>
<tbody
    <tr>
        <td>
            <span>20/01/2021</span>
            <a href="https://www.abcdcards.in/online-payment.htm"">Pay Now</a>
        </td>
    </tr>
</tbody>
</table>

Expected behavior

20/01/2021 Pay Now

Current outpur

It only coming as text and non clickable in the pdf.

it should come as clickable link and should redirect to given link.

Thanks you.

@rajeshkr7
Copy link
Author

New test case,
It working for body but not in header and footer.

'wkhtmltopdf' '-B' '50' '-T' '110mm' '--header-html' 'header.html' '--footer-html' 'footer.html' 'index.html' 'body.html' 'abcd.pdf'

@PhilterPaper
Copy link

I seem to recall that there were a number of reports of PDF links having only a small clickable area, e.g., the bottom 10% of what you would expect to be the clickable area. You might check if your reported problem is the same as this, or if you actually have no clickable area on the link. Unfortunately, I don't think this was ever fixed, but maybe there were some workarounds.

@rkrathor
Copy link

@PhilterPaper, I didn't find any area to be clicked but.
Strange thing is, same thing can work on main file.
I mean , only issue is , if I am using that in header and footer.

@arjunsuresh
Copy link

Can you try after removing "'-B' '50' '-T' '110mm'"?

@Chaostheorie
Copy link

@rkrathor a workaround for footers that I found to be working with the newest release was:

Some Text wihtout meaning <a href="https://creativecommons.org/licenses/by/4.0/" style="display: block; position: absolute; height: 1em; top: 3em; text-decoration: none; width: 500px">&nbsp;</a>- Licensed under CC-BY 4.0

This makes the whole footer region with at least the link clickable. Might also work in main body. But this workaround is not from me but a combination of workarounds from the original issue about link field sizes in footers (can't find it right now). If you found the footer/ header thread you might also be able to test different workarounds

@Chaostheorie
Copy link

Also, possible duplicate of #4993

@arjunsuresh
Copy link

Actually for me the Top margin was pushing the clickable portion of the link by that much (the footer link working as if there's no margin).

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

No branches or pull requests

5 participants