shivaprsd / doqment

Mozilla's HTML5 PDF Viewer with Reader-mode add-on. 📖
https://shivaprsd.github.io/doqment/src/pdfjs/web/viewer.html
MIT License
33 stars 1 forks source link

How to set defaults? #5

Closed bryankaplan closed 1 year ago

bryankaplan commented 1 year ago

With pdfjs, I can go into about:config and set pdfjs.defaultZoomValue to 'page-width'.

Is there an equivalent means to set the default zoom value in doqment?

More broadly, is there any means to set any default values?

shivaprsd commented 1 year ago

@bryankaplan No, and yes.

There is a way, but you have to use the browser Dev Tools. Open a doqment tab, open the Console and execute the following code:

PDFViewerApplication.preferences.set('defaultZoomValue', 'page-width')

Similarly for any other property. You will have to do this only once.

(Unfortunately this won't have any effect at the moment; I am overriding the defaults to force-enable the annotation editor in the current version of doqment. This is reverted in the upcoming release, which should be available in the store in a few days time.)


There is already a request in #2 for a convinient way to do this. I proposed to implement a UI, but it got deferred. I hope to work on it in the near future. 🙂

bryankaplan commented 1 year ago

Thank you, @shivaprsd. I agree an Options page is the right answer, once you're able to build it out. In the meantime, that's an easy enough workaround. I look forward to being able to set the pref. Thank you, btw, for doqment — I love it.

shivaprsd commented 1 year ago

@bryankaplan The release is now published in Firefox Add-on store. Please update.

bryankaplan commented 1 year ago

Updated, tested, and confirmed — LGTM. Thank you, @shivaprsd.

shivaprsd commented 6 months ago

@bryankaplan We finally have an Options page! Please update to version 0.7.

Better late than never I guess. 🙂

bryankaplan commented 6 months ago

It looks great, @shivaprsd. It's so helpful. Thank you!