Skip to content
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

Make resolution of extracted images configurable #23

Open
serovar opened this issue Jan 24, 2021 · 3 comments
Open

Make resolution of extracted images configurable #23

serovar opened this issue Jan 24, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@serovar
Copy link

serovar commented Jan 24, 2021

It would be really appreciated, if possible, the addition of a setting to raise the default image quality of the produced OCRed pdf, since the default quality is suboptimal in many instances.

E.g. (Top: Original, Bottom: OCRed version)

Zotero-OCR

@zuphilip zuphilip added the enhancement New feature or request label Jan 24, 2021
@zuphilip
Copy link
Member

zuphilip commented Jan 24, 2021

The first step is to extract the pages from the pdf into png images. There is a resolution parameter there which currently is set to 300dpi:

yield Zotero.Utilities.Internal.exec(pdftoppm, ['-png', '-r', 300, pdf, dir + '/page']);

It is possible to make this also configurable with a parameter. Then you could try to use e.g. 600 better image quality within the newly created pdf.

Does this sound like it could be a solution for you?

@serovar
Copy link
Author

serovar commented Jan 26, 2021

Yes, it would be perfect :)

@zuphilip zuphilip changed the title Add a "Quality" setting Make resolution of extracted images configurable Jan 26, 2021
@stweil
Copy link
Member

stweil commented Mar 25, 2024

Related pull request: #41.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants