Giter Club home page Giter Club logo

pdf-to-powerpoint's Introduction

PDF to Powerpoint Converter

This script converts PDF files into Powerpoint, but does each slide as an image. This ensures there are no font issues or other problems, and the slides look the same in Powerpoint as they did in PDF.

Why?!

Many AV setups mean that if you are using PDF slides you cannot have 'next slide' on a confidence display whilst you speak. Having come up against this at multiple conferences, I decided I'd convert my decks (which I was making in Keynote) from PDF to Powerpoint. Most converters try to keep the text as text but often introduces many inconsistencies.

Usage

Running:

python convert.py example.pdf

Will produce example.pptx in the same folder.

Dependencies

In addition to the python packages in requirements.txt, poppler is also required in order for this script to work. On Mac OS you can install this with brew install poppler.

pdf-to-powerpoint's People

Contributors

6a61736f6e206e61646572 avatar tomanthony avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pdf-to-powerpoint's Issues

Can not install poppler

Hi, I can see your code, but I can not run it, because there is a problem for me to install poppler. My operation system is win10, and the version of python is 3.7.3. So, do you know some commands to install poppler? Thanks a lot!

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.

Output dimensions in pixels

How can I set the output resolution in pixels? The current code has this:

	# Set slide dimensions
	prs.slide_height = height * 9525
	prs.slide_width = width * 9525

	# Add slide
	slide = prs.slides.add_slide(blank_slide_layout)
	pic = slide.shapes.add_picture(imagefile, 0, 0, width=width * 9525, height=height * 9525)

There is multiplier of 9525 but I want to fix the output to 1920x1080px. What units does the number relate to and can a pixel value be set?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.