I'm currently working on an application that involves reading pdf files into a variable and passing them to a server via http POST method.
On Linux, everything is fine because I can use cat and popen:
pdf = os.popen('cat testpdf.pdf').read() #read pdf data in Linux
However, in Windows, the DOS equivalent of cat called "type" is giving me garbage for pdf values.
My questions:
Is there a way to safely read a pdf values using DOS commands?
If not, how could I store a pdf in a single variable using Python?
Thanks