Add configs for DPI, Page Segmentation Mode, and Zotero non-linked attachments #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thought I'd take a stab at this.
Added outputDPI and outputAsCopyAttachment as configuration options.
It seems to work, but I'm unable to get it to work with group libraries - do you have any idea why that might be?
briefly:
It works when I have a pdf selected on my personal 'My library' sub-collection, but when I use it on something selected in a sub-collection in my 'group library' I get errors like (below). The errors happen with the zotero-ocr plugin as well so maybe I shouldn't be basing my logic off that plugin and that's my problem.
[JavaScript Error: "Parent item 1/4Q5DY97J not found" {file: "chrome://zotero/content/xpcom/data/item.js" line: 1537}]
My guess is that for some reason in group libraries parents are mangled in the database, but I'm not sure how to check or confirm.
because the code to me appears correct and this line
https://github.com/danpf/zotero-ocr/blob/9eb9a8ec9a5ada40be27d07ca6de847637c14d2b/chrome/content/zoteroocr.js#L105 seems to be returning the right stuff.
I made a post in zotero dev about the issue but didn't get a response:
https://groups.google.com/g/zotero-dev/c/LVmcjIMqYvA