-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
gitea can not show pdf annotation #7139
Comments
IIRC Gitea does not render the pdf itself, it uses pdf.js or just lets the browser render the pdf. So this is more likely to be an issue with your Browser, not Gitea. |
@kolaente might be we need to update to library pdf.js to latest version |
Wow it looks like our pdfjs is quite old... v1.4.20 https://github.com/mozilla/pdf.js/releases/download/v2.0.943/pdfjs-2.0.943-dist.zip is the most recent version |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
@laoshaw We updated the pdf viewer lib. Can you test on try.gitea.io if it works now ? |
Just did a quick test unfortunately it basically still is not working, only a pop-up notes shown, all the highlight underline etc are no-shows. |
https://pdf-highlighter.com/docs/Highlighting_PDF_Viewer.html this is based on pdf.js and it seems had things integrated well too |
closed by #7834 |
why close this so quickly? |
We shouldn't have close it if not fixed.
Have you try to open your pdf with it ? |
new pdf.js supposedly should be able to open annotation somehow it did not work under gitea yet. i have not used highlight-pdf-viewer myself. I will try to debug when I become more familiar with golang. |
https://usefulangle.com/post/94/javascript-pdfjs-enable-annotation-layer How to Enable Annotations in PDF.JS |
If you want to give it a try, pdfjs is now on the latest version and we load the viewer of pdfjs here : gitea/templates/repo/view_file.tmpl Line 66 in bcbc9f3
The viewer is located here : https://github.com/go-gitea/gitea/tree/master/public/vendor/plugins/pdfjs I don't think you will need to learn Go (just need to install it) to fix this as it is more a frontend problem. Don't hesitate to open a PR to discuss over your code. |
Any samples for test? Maybe this has been fixed. |
There is no pdfjs anymore. PDF is rendered natively if it could be. |
So I think it will depend on the web browser's support. |
Running gitea 1.8.2 on Linux and just noticed the PDF with highlights are not shown highlights, just the original PDF, can gitea support pdf annotation like normal pdf readers(evince,etc)?
The text was updated successfully, but these errors were encountered: