Someone asked me to code a program that translates French-language PDF files to English, and I thought that maybe I could convert the PDF files to Word documents or some other text document with a program I coded in C++, and then translate the text using Python's xgoogle library. Is programming this indirect translation process even feasible, and if so, how do I go about doing it? Thank you for your reply in advance.
Jump to Post
If under Linux, you can use the "pdftotext" command (from package "poppler-utils"). Then, you can use "libtranslate-bin" package to install a text translator program and use it with "translate-bin" command. So, your problem can be entirely solved by:
$ pdftotext my_file.pdf my_file.txt $ translate-bin -s google -f …
All 7 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.