bookmarklets icon indicating copy to clipboard operation
bookmarklets copied to clipboard

Non searchable PDF didn't work (Grok, ChatGpt, Gemini)

Open tagwato opened this issue 1 year ago • 2 comments

Hi, great job! The searchable pdf is printing for all cases I tested (Grok, ChatGpt, Gemini). Unfortunatelly, the NON-searchable pdf option did not work well in any case.

  • Grok: it prints, but all pages are empty

  • ChatGpt: message in console says: "VM205:1 Refused to load the script 'https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.3/html2pdf.bundle.min.js' because it violates the following Content Security Policy directive: ... ...."

  • Gemini: message in console says: "VM287:1 This document requires 'TrustedScriptURL' assignment."

tagwato avatar May 19 '25 16:05 tagwato

Thank you for your attention! I have just checked the non-searchable mode for all supported AI chats. Unfortunately, ChatGPT and Gemini have prohibited any third-party libraries at their websites. For this reason, the non-searchable mode is not available for ChatGPT and Gemini because the non-searchable mode requires a such library, namely html2pdf. Content Security Policy accounting added to the bookmarklet with the commit 88767702d55c36f857c1d02c6de87f9d10303c96. Fortunately, the searchable mode does not require any third-party libraries and works with vanilla Javascript.

At the same time, the non-searchable mode still works for Grok (MacOS, the latest version of Firefox Browser). Could you please recheck the non-searchable mode for Grok?

give-me avatar May 23 '25 07:05 give-me

You are right, the non-searchable mode is working for Grok. Tested with Chrome.

tagwato avatar May 26 '25 00:05 tagwato