ropensci / pdftools

Text Extraction, Rendering and Converting of PDF Documents
https://docs.ropensci.org/pdftools
Other
513 stars 69 forks source link

pdf_data show Local Font Name #83

Closed Cdk29 closed 3 years ago

Cdk29 commented 3 years ago

Here my Pull Request for Issue #29, allowing pdf_data to read the font of each text_box().

As requested the change of api calls are inside (several) version macros. I tested it on Ubuntu 20.10 and 20.04 (so, with and without a poppler version >= 89 that allow to read the fonts information) and it compile and works on the two platforms.

I took the freedom to add a has_local_font_info output inside get_poppler_config(), since I had local trouble for debugging at the beginning. I tried to respect the way the pdf_data function and the macro were wrote inside binding.cpp.

Cdk29 commented 3 years ago

Hi. Also, I did this pull request in the excitation of having solved the issue, but I did not think of squashing the commits first.

Should I do it and PR again ?

jeroen commented 3 years ago

Can you remove the 33MB pdftools_2.3.1.9000.tar.gz file from this PR?