pdf-to-powerpoint icon indicating copy to clipboard operation
pdf-to-powerpoint copied to clipboard

Large size because of TIFF

Open gkvallis opened this issue 5 years ago • 1 comments

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.

gkvallis avatar Aug 28 '19 19:08 gkvallis

pdf_file = sys.argv[1] IndexError: list index out of range

jinskrish avatar Oct 22 '20 11:10 jinskrish