Closed cristicotet closed 2 months ago
The icon isn't there because I've inlined it in the CSS code. I can see the paperclip in the showcase. Please navigate to https://pdfviewer.net/extended-pdf-viewer/two-way-binding, set the input field above the button to 3, click the button and compare your screen to both your application and to this screenshot. Is the paperclip missing?
Go to https://tcpdf.org/examples/example_041/ and download the PDF file Direct link to PDF: https://tcpdf.org/files/examples/example_041.pdf
Go to https://pdfviewer.net/extended-pdf-viewer/two-way-binding press the "Open" button in pdf viewer toolbar and select the PDF file. You will see a request for https://pdfviewer.net/assets/images/annotation-pushpin.svg - image also not available
When generating PDF file you have multiple icon choices:
The icon names can be found here: https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf Extract:
I wasn't aware of that feature. Fun fact: neither Apple Preview nor Google Chrome show the icon.
Yes, they don't. The feature is nice, please don't remove it.
By the way.. PDF Viewer should not be allowed to make requests to any URL/file. I hope there is a check somewhere to only make requests to assets, maybe only GET requests. The problem here is that the PDF Viewer will make requests from user context and will include cookies.
Don't worry, I don't want to remove the feature. The only reason why I didn't support it is that I wasn't aware of it, so I didn't see any point in shipping images nobody's missing.
As for making requests to arbitrary resources - I don't see how this might happen, with the exception of JavaScript embedded with the PDF file. However, I'm not the export on this topic. Better reach out to the pdf.js team.
Version 21.1.2 has just landed and solves the issue.
Enjoy! Stephan
Icon available at the following address (missing from \ngx-extended-pdf-viewer\assets\images)
https://mozilla.github.io/pdf.js/web/images/annotation-paperclip.svg
version affected: 21.1.0 (and older)
steps to reproduce: open PDF with attachments