openoereb / pyramid_oereb_mfp

Implementation of a static extract (PDF export) for the pyramid_oereb server with MapFish-Print
1 stars 3 forks source link

Multiline Link in non-PDF-A Extract has wrong links in Adobe Acrobat Reader #38

Open svareg opened 5 years ago

svareg commented 5 years ago

Hello,

When you generate a PDF extract, some URL can be on many lines, because they are very long.

The problem is :

grafik grafik

Result: grafik

grafik

Result: grafik

This happens much more than you can think, because when you click quickly, there is a substancial probability that you click between the 2 lines, and that the link does not work.

I don't really understand how the url can be wrong here... If it were a "margin" error, then there should just be no link at all...

Corresponding PDF extract (see page 4): 6f2cfb7b-b340-4422-a526-30d501a5bd37.pdf

Can someone reproduce this too? Thanks!

peterschaer commented 5 years ago

We observe a similar issue. Depending on the software you use to open the pdf we get different result

in this example extract there is a multiline link on page 5 (Rechtsvorschriften): 20191009011003_extract.pdf

When opening the pdf in Acrobat Reader (v2017 on Win7) the link works as expected.

When opening the pdf in the builtin pdf reader in Chrome v72 the link is cut off after the first line. It is therefore not working.

When opening the pdf in the builtin pdf reader in Firefox 69 the links don't work at all.

jwkaltz commented 4 years ago

@peterschaer The hyperlinks work now in all viewers (at least, all that I have tested). Please note that while the hyperlinks work now, JasperReports does not provide a box around the whole link, as some tools such as Word do; therefore the user click will work only when the user clicks on the text within the link.

jwkaltz commented 3 years ago

As discussed in https://github.com/openoereb/pyramid_oereb/issues/1278, the original resolution of this bug does not work in all cases.

To reproduce:

marionb commented 3 years ago

Note:

The problem:

Currently I can not find a way to tell JasperReports to close that "hole" between the lines of a link. In my opinion it is a problem coming from Acrobat Reader because it does not correctly interpret multi-line URLs.

Adding this hyperlinkTarget=Blank Seems to fix the issue for Acrobat but breaks it for all others I tested. (see also #42)