Belval / pdf2image

A python module that wraps the pdftoppm utility to convert PDF to PIL Image object
MIT License
1.64k stars 195 forks source link

Add support for poppler's hide-annotations flag #199

Closed StaticRocket closed 3 years ago

StaticRocket commented 3 years ago

Resolves #17

Adds support for poppler's hide-annotations flag which removes the drawn bounding boxes for links and other annotations.

Belval commented 3 years ago

Thank you for implementing this, do you think you could add a test to ensure that it works?

StaticRocket commented 3 years ago

Yeah, I'll add a test and update the docs tonight.

Could you tell me if raising a not implemented error to inform the user that pdftocario doesn't support the hide annotations arguments is the right call?

Belval commented 3 years ago

Yeah it works for me. There seems to be some effort by the main developers to implement it but in the meantime we can just raise an exception.

codecov-commenter commented 3 years ago

Codecov Report

Merging #199 (db7d8aa) into master (70eeb68) will decrease coverage by 0.59%. The diff coverage is 66.66%.

:exclamation: Current head db7d8aa differs from pull request most recent head 69e9191. Consider uploading reports for the commit 69e9191 to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##           master     #199      +/-   ##
==========================================
- Coverage   96.27%   95.68%   -0.60%     
==========================================
  Files           5        5              
  Lines         295      301       +6     
==========================================
+ Hits          284      288       +4     
- Misses         11       13       +2     
Impacted Files Coverage Δ
pdf2image/pdf2image.py 94.75% <66.66%> (-0.76%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 70eeb68...69e9191. Read the comment docs.

Belval commented 3 years ago

I'll test it today or tomorrow and merge it if everything works as expected. Thank you for your contribution!

Belval commented 3 years ago

Thank you for your contribution.