-
Notifications
You must be signed in to change notification settings - Fork 10
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
How to make a custom text pointing to an URL #29
Comments
Oh well, just like this..
|
The solution above works fine, if the user opens the PDF in the Chrome. But if the users opens the PDF in Adobe, on mobile, etc., the link is not recognized and therefor not working. Is there another way to create a hyperlink to an external website? |
please take a look into |
Works perfekt! Thank you very much 😃 |
Hi @jangko The links works out of the box, if I view them in Chrome or Okular, but when viewing them on my mobile devices or Firefox, they don't work. I have been trying to adjust the code in
whereas when I look into other PDF files formatting (with links), it looks like:
Do you know whats wrong, or in which direction I need to look to find a solution? |
hmm, looks like the hyperlink is made through annotation action and not via widget action. You can take a look in the PDF reference for detailed information about PDF internals. Could you please send a link to your pdf example if allowed, perhaps using gist or something. PDF spec is very dense, not only you and me have difficulty with it. foxit reader also have repeated regression. others PDF reader/writer may also have same problems. |
I have inserted a PDF file here: 2020-07-25 - Testing NimPDF.pdf Thanks for looking into it! And I'm happy to hear, that I'm not the only one have trouble with it 😉 |
Hi @jangko Have you seen the attached PDF? I have looked at |
Hi @jangko I have tried to look into it again but with no luck. If you are interested, I would like to sponsor/pay for this feature. |
I'm sorry I cannot accept your offer. Actually you can help speed up this process by finding a working example and send it to me, but the example should be working reliably at your target platform/reader. And then I can synthesize/imitate it for you. |
Thank you @jangko. I have attached a working example here: Test of hyperlink.pdf The file has been generated with Word Office 365. Tested on following devices:Android:
iPhone:
Linux:
Windows:
Browser:
Document detailsWhen I inspect the document, the structure is identical to other PDF files with working links:
Extract of document details: The link annotation is shown in the Expand document details
|
@ThomasTJdev, actually it is a simple I've only test it with Foxit Reader 9.7.1 and FireFox browser on Windows |
I have now tested it in development and in production - and it works flawless on all devices 😃 ! Thank you very much @jangko! |
glad it works. 👏 |
Is it possible to create links to a website with a custom text? For example "My Google" which directs to www.google.com? I can only find
doc.linkAnnot
for hyperlinks, but it only takesDestination
, where an URL doesn't fit well.Thank you.
The text was updated successfully, but these errors were encountered: