From f56c584092adb8b3289791356f9c1cdf6e604e7e Mon Sep 17 00:00:00 2001 From: Manice18 Date: Sat, 8 Oct 2022 17:35:50 +0530 Subject: [PATCH] Added script for PDF to PPT conversion --- scripts/PDF_to_PPT_Converter/PDF_to_PPT.py | 7 +++++++ scripts/PDF_to_PPT_Converter/README.md | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 scripts/PDF_to_PPT_Converter/PDF_to_PPT.py create mode 100644 scripts/PDF_to_PPT_Converter/README.md diff --git a/scripts/PDF_to_PPT_Converter/PDF_to_PPT.py b/scripts/PDF_to_PPT_Converter/PDF_to_PPT.py new file mode 100644 index 0000000..00434f9 --- /dev/null +++ b/scripts/PDF_to_PPT_Converter/PDF_to_PPT.py @@ -0,0 +1,7 @@ +import aspose.slides as slides +import aspose.pydrawing as drawing + +with slides.Presentation() as presentation: # Create presentation + presentation.slides.remove_at(0) # this removes default slide from presentaion + presentation.slides.add_from_pdf("path") # here path denotes the destination of the file you want to convert + presentation.save("path", slides.export.SaveFormat.PPT) # here path denotes the destination of the converted file / the path where you want to save the converted PDF file \ No newline at end of file diff --git a/scripts/PDF_to_PPT_Converter/README.md b/scripts/PDF_to_PPT_Converter/README.md new file mode 100644 index 0000000..090e4ac --- /dev/null +++ b/scripts/PDF_to_PPT_Converter/README.md @@ -0,0 +1,17 @@ +#
Requirements +1. Step-I: + Install the required python dependency. + + `pip install aspose.slides` +2. Step-II: +Give the proper destination/path of the PDF file you want to convert into PPT. + For example, "E:\test1\test.pdf" . + +3. Step-III: + Give the proper destination/path for the converted file, ie, the path where you want your file to be saved. + + For example, "E:\test1\test.ppt" . + + +*** +**Please watch out for escape sequences while writing the path.** \ No newline at end of file