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

Fix unclickable links GSPOE-20 #42

Merged
merged 3 commits into from
Dec 9, 2019
Merged

Fix unclickable links GSPOE-20 #42

merged 3 commits into from
Dec 9, 2019

Conversation

marionb
Copy link
Contributor

@marionb marionb commented Dec 6, 2019

Fix #38
This PR:

  • makes it possible to open links when clicking on them in all PDF viewers
  • cleans up the code for hyperlinks and avoids using long code elements in text fields. Instead PrintWhenExpressions are used when possible.

IMPORTANT NOTE:
when creating a hyperlink in one of the templates, use the following example:

<textField hyperlinkType="Reference">
  <reportElement x="5" y="95" width="300" height="15"/>
  <textFieldExpression class="java.lang.String">"  >> Click here to go to www.google.com"</textFieldExpression>
  <hyperlinkReferenceExpression>"http://www.google.com"</hyperlinkReferenceExpression>
</textField>

Do NOT add hyperlinkTarget="Blank" ! This will break the link for many PDF readers.
http://jasperreports.sourceforge.net/sample.reference/hyperlink/index.html

@marionb marionb self-assigned this Dec 6, 2019
@marionb marionb force-pushed the fix-unclickable-GSPOE-20 branch from e0b5417 to 4cd7ede Compare December 9, 2019 12:21
@marionb marionb changed the title [WIP] Fix unclikable links GSPOE-20 Fix unclikable links GSPOE-20 Dec 9, 2019
@marionb marionb requested a review from jwkaltz December 9, 2019 12:48
@jwkaltz jwkaltz changed the title Fix unclikable links GSPOE-20 Fix unclickable links GSPOE-20 Dec 9, 2019
Copy link
Member

@jwkaltz jwkaltz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with pyramid_oereb dummy report, on Microsoft Edge PDF reader, Firefox PDF reader, Chrome, Adobe Acrobat (on Windows).
This fixes the hyperlinks (but does not provide a box around the whole link, as some tools such as Word do).

@jwkaltz jwkaltz merged commit aec1d52 into master Dec 9, 2019
@jwkaltz jwkaltz deleted the fix-unclickable-GSPOE-20 branch December 9, 2019 14:35
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

Successfully merging this pull request may close these issues.

Multiline Link in non-PDF-A Extract has wrong links in Adobe Acrobat Reader
2 participants