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
Click to open link on pdf when link not hyperlink #129
Comments
thanks for the quick response :) |
I update to 1.6.0 and I always have the same behavior :/ with the file without hyperlink |
I just download the document, and drag drop it to https://react-pdf-viewer.dev, and it works as expected. You can try to see. Does it work if you place the viewer in the page, not inside the modal? Updated |
I created a codesanbox to confirm that without obstructing css rules, it is still the case In fact, on the native pdf reader of chrome or firefox, when a pdf has been generated with a line containing an http / https link but without using a "hyperlink", the pdf reader recognizes it anyway and offers the link as clickable |
As I told you above, I work for a training center, so the teachers creating the pdf could actually use hyperlinks in the document but what do you want? :p This type of profile is not comfortable with IT and I think this feature is interesting anyway, in addition to the excellent work already provided :) |
@JSurquin I am clear now.
There're some libraries such as I'll try to create an example for you using one of these libraries with the viewer. |
@JSurquin Here is a working example. Demo (take a look at the bottom of the screenshot below, and you'll see that the text is replaced with a link) |
Awesome, it works well and it's the perfect behavior |
Great. Let me know if you have any questions or suggestions. |
Hello, I did a test by creating a simple example of pdf without hyperlink, I put https://google.fr and check it in the pdf reader, the link is not clickable, however, if the link is in hyperlink via libreoffice or other, the link is clickable :)
I did the same test with the native pdf reader of google chrome and whether in hyperlink or not, it detects that it is a link and allows to be able to click on it
Would it be possible to think of this scenario?
Indeed, the standard is respected but I do not think that the agents (I work for a company recognized as a training organization / education) will have the idea of creating hyperlinks while they make their pdf
I could put a very quick example on a codesanbox or share the two pdf to dissociate the two cases, if necessary :)
Thank you again for taking the time to read me.
The text was updated successfully, but these errors were encountered: