Skip to content

adding encoding options for pdftotext - #469

Closed
Enzodtz wants to merge 1 commit into
deanmalmgren:masterfrom
Enzodtz:patch-1
Closed

Enzodtz wants to merge 1 commit into
deanmalmgren:masterfrom
Enzodtz:patch-1

Conversation

@Enzodtz

@Enzodtz Enzodtz commented Jun 27, 2023

Copy link
Copy Markdown

Hi,

I'm trying to use this tool to extract text from a PDF file, but it doesn't seem to support passing the encoding directly to pdftotext.

This would cause me issues with letters that aren't in the default encoding, such as ã, à, á etc. They're being saved as �.

In order to fix this, I added the shell_encoding kwarg that would allow one to choose the correct encoding for the shell parser, pdftotext, in this case.

In order to do that, I also needed to refactor a little bit the argument parsing code.

Thanks.

@KyleKing KyleKing self-assigned this Feb 3, 2026
@KyleKing
KyleKing self-requested a review February 3, 2026 02:39
@KyleKing KyleKing removed their assignment Feb 3, 2026
@KyleKing

KyleKing commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Thank you for the submission! I've implemented specifying encoding for pdftotext in #596. Please let us know if you have any feature requests, bugs, and contribute changes in the future

@KyleKing KyleKing closed this Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants