-
-
Notifications
You must be signed in to change notification settings - Fork 915
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
Links not clickable in the rendered pdf. #552
Comments
Anything in the console? Try adding onRenderAnnotationLayerSuccess={console.log}
onRenderAnnotationLayerError={console.error}
onGetAnnotationsError={console.error} to your BTW: key={i * Math.floor(Math.random() * 1000) + 1} that's a horrible, horrible idea. |
Thank you for your reply @wojtekmaj. I added the event listeners but nothing is logged on any of the above listeners. Is there anything we should make sure to add in pdfs to make the links like this work? Haha and that key thing I know was just playing around 😛 |
If neither onRenderAnnotationLayerSuccess nor onRenderAnnotationLayerError were called, then no annotations were loaded. Check is onGetAnnotationsSuccess callback returns something (it should). Attach PDF file if it still fails. |
onGetAnnotationsSuccess callback returns blank arrays, here is the pdf file. |
@rishabhbatra10 I too faced the same problem, but this is nothing to do with the @wojtekmaj's react-pdf library. I just converted my pdf to word which has links that's not working and found that the hyperlinks are not added to those texts. So, I added the hyperlinks in the word documents and then converted to PDF, hosted it on my server again. Now, it's working fine and I get the links in onGetAnnotationsSuccess callbacks too. The problem is we got confused that the links without hyperlinks works both on Adobe Reader and also on the Chrome PDF Viewer. It seems, they detect the links that are not hyperlinked and hyperlink the same. Provided that we should import the Annotation Layer css in our ReactApp
|
I did read the previous issue #199 which had explained some of the possible reasons links are not working and hence I imported the AnnotationLayer.css. But still, I am facing this issue of links not being clickable.
Here is my code
Please let me know if I am missing out anything. Thanks!
Environment
The text was updated successfully, but these errors were encountered: