gkovacs / pdfocr

Adds text to PDF files using the cuneiform OCR software
MIT License
325 stars 49 forks source link

Add support for files with ".PDF", not just ".pdf" extension #17

Closed mmcraedhcu closed 9 years ago

mmcraedhcu commented 10 years ago

.PDF and .pdf are both valid extensions for PDF's, and the difference of extension does not drastically affect the file's content.

Many systems / programs will create / export PDF's with a ".PDF" extension rather than ".pdf", but pdfocr fails for PDF's with ".PDF" extension. Both formats should be supported.

In the source, line 167 reads if outfile[-3..-1] != "pdf" then it goes onto print an error message. This line should be changed to also check for "PDF", or compare the strings in a case-insensitive way.

gkovacs commented 9 years ago

fixed!