Camelot uses ghostscript (a GPLv3 licensed project, which is a wrapper on top of ghostscript, an AGPL licensed project) to convert PDFs to PNGs in order to do line recognition and table detection in the Lattice flavor. Back when Camelot was created, we used ghostscript because it was the best solution out there for converting a PDF to a PNG, and we didn’t know about how Camelot’s license (MIT) is incompatible with ghostscript’s license (GPL and AGPL). Since then I’ve read that if you extend/use a GPL licensed project, you have to release the thing you build with the GPL license too. I want to get some clarity of where the distinction lies wrt Camelot, and if we need to relicense Camelot with the GPL license, or if there’s something we can do (like calling ghostscript using the CLI and not import its code inside Camelot) to avoid relicensing. Right now the ghostscript wrapper is distributed with Camelot.
Since ghostscript (not the wrapper) has been a pain to install for users, I worked on pdftopng some months ago, which is a wrapper on top of poppler a PDF rendering library written in C++. It has pre-built wheels for all major operating systems which should make installation as easy as a pip install. But poppler and therefore pdftopng is GPLv2 licensed, so I also want to get some clarity on what would be the best way to integrate it with Camelot, and remove ghostscript as a dependency / make ghostscript optional.