Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

converting a single png to a pdf using python

Im trying to convert a png file into a pdf using python. Doing a bit of research found out that there is a method by which you use a unix call

convert file.png file.pdf

However when I use this method I get an error saying Invalid Syntax . That doesn't work in the terminal or from a python script using the os.system() method.

I tried the FPDF() method which gives me a AttributeError: 'PngImageFile' object has no attribute 'rfind' error I was wondering if there are any other ways to convert a png into a pdf

Comments