pdfjs
pdfjs copied to clipboard
Wrong links through linebreak in table cell
Hi, so I encountered a bit of an odd issue. It appears if there is a (long) text with link in a table cell and the text is broken to the next line. If you hover over the text there is an area where it links only to a location consisting of the first line and a area where it links to the location as specified with the text's link attribute. Is there maybe a workaround to avoid the incomplete link?
Thanks!
Seen using Acrobat Reader DC 2019.012.20035
var doc = new pdf.Document({ font: fonts.Helvetica })
var table = doc.table({
widths: [14* pdf.cm]
})
table.row().cell().text().add('https://some.very/long/link/', {
link: 'https://some.very/long/link/',
underline: true,
color: 0x569cd6,
fontSize: 40
})
Good find! I'll try to look into it this week
@jjojok tested it and I don't see the issue yet. I've hovered each letter and clicked most parts of the link, and everything is pointing to https://some.very/long/link/ for me (tested on preview and acrobat reader DC on macOS).
Could you open your resulting PDF file in a text editor and search for /URI (
. Does on of the search results include an incomplete link? In my case, all search results look like: /URI (https://some.very/long/link/)
No you are right, there are no incomplete links, just two cases of /URI (https://some.very/long/link/)
as one would expect. So this has to be some kind of renderer issue? Thank you for your help anyways!
So this has to be some kind of renderer issue?
Yes, kinda sounds like a render issue 😕