metebalci / pdftitle

a utility to extract the title from a PDF file
GNU General Public License v3.0
131 stars 21 forks source link

Give suggestion to use `--replace-missing-char` in the error message? #37

Open user202729 opened 9 months ago

user202729 commented 9 months ago

I think this would help the user to discover the option. Currently the error message just say "PDF contains a unicode char that does not exist in the font", maybe add "or pass --replace-missing-char=" " to forcefully ignore this error" there.

Alternatively, it's also possible to replace it with some dummy character, then if the extracted title does not contain any dummy character then silently ignore the error, since there's no harm.

Making replace-missing-char the default is also an option, but I think it's a conscious design choice to not make it so. In my case, can be I'd overwhelmingly want to use that option however.