pdf-to-powerpoint
pdf-to-powerpoint copied to clipboard
Large size because of TIFF
In the convert.py script the format of the image conversion is set to TIFF, so each pdf slide is converted to a TIFF image. This works fine and creates a pptx file of reasonable size. However, if you open the pptx file in powerpoint, make a trivial change and save it, the file size may increase by a factor of 50 (!), evidently because the TIFF image is not compressed.
If you change the image format to PNG it all works fine and the pptx file can be edited if needs be without an enormous increase in file size. Just change: slideimg.save(imagefile, format='tiff') to slideimg.save(imagefile, format='png') and it all seems to work, although I have not extensively checked and there may be other issues.
Otherwise, works like a charm. Thanks for the script.
pdf_file = sys.argv[1] IndexError: list index out of range