awesome-notebooks
awesome-notebooks copied to clipboard
Python - Convert file from .pptx to .pdf
Let's find a way to do it so we can render pptx via pdf inside Jupyter env.
Hey @jravenel i would like to work on this, can u please assign it to my name
Hey @rexdivakar thanks for the suggestion. Let me connect you to @FlorentLvr that will be the reviewer.
I just added you to the contributor team on the GitHub org. Let's ensure the pptx is accessible over the internet so anyone can reproduce. I found this one for example : https://www.just.edu.jo/~zasharif/Web/SE495/Python/Slides/python1.ppt
So the template would look like:
Input: FILE = "https://www.just.edu.jo/~zasharif/Web/SE495/Python/Slides/python1.ppt"
Model: function to transform the file into pdf
Output: fallback message "✅ {FILE} has been successfully converted to PDF"
is that clear for you? Let me know.
Hey @jravenel after quite digging i figured it out that this cannot be fully automated without having PowerPoint installed, cox there seems to be no direct way for converting this ppt file to a pdf without external translation enabled. Kindly advice.
@rexdivakar Thanks for your message, did you try this lib?
https://pypi.org/project/ppt2pdf/
- https://gist.github.com/vikram-ai/5c811d076f7c4d17d3b497fc5fff8224
? Let me know 🙏
Yup they all have dependency over PowerPoint software and cannot be used across platforms without office softwares installed.
I guess this on is the same ? https://community.esri.com/t5/python-questions/how-can-i-use-python-to-convert-ppt-to-pdf/td-p/310114
It looks like it works for them by reading the thread
Hey @jravenel i would like to work on this ,is it not assigned to anyone, can u please assign it to my name
I guess this on is the same ? https://community.esri.com/t5/python-questions/how-can-i-use-python-to-convert-ppt-to-pdf/td-p/310114
It looks like it works for them by reading the thread
Testing the same will rasie a PR asap, kindly assign it to my name
All the snippets you shared require some form of office installation over the device, as i mentioned earlier we cannot directly convert it as its a binary module. Do you have any other suggestions ?
Hey @jravenel i would like to work on this ,is it not assigned to anyone, can u please assign it to my name
@Venkatakrishnan-Ramesh It's already assigned as you may see the discussion on this thread 😉
All the snippets you shared require some form of office installation over the device, as i mentioned earlier we cannot directly convert it as its a binary module. Do you have any other suggestions ?
- [x] @rexdivakar we have not been able to sync with @Dr0p42 about this but we will discuss it during the weekly product roadmap next Monday ! Thanks for the research on this 🙏 you can join the meeting next Monday it's public
sure definitely !
@rexdivakar moved it to in progress for discussion, I'm wondering if it would not be better to just use the Google Slide API to build slides and export them as a PPT or whatever format programatically, google slides API seems better option, what do you think guys @FlorentLvr @Dr0p42 ?
Hi @jravenel I have a solution for it. May you please assign it to me? and I will also need your help to install LibreOffice on your servers. A solution can be found in this link in google collab if anyone would like to try it themselves.
Short answer, yes it needs windows to use Microsoft API, but LibreOffice command line has an api to convert pptx files to pdf as well. " !soffice --headless --convert-to pdf $file_path ".
The only thing that is needed is installation of LibreOffice which can be done but I doubt that Naas requires a password to install it "I tried".
Thank you in advance,
Hey @AhmedMousa-ag, we need to dig into it. Can you share more about the LibreOffice install procedure so we can see if it's possible to do it and what we can do apart from this feature?
@Dr0p42 do you think we can set this up in naas? https://colab.research.google.com/drive/1LzpwMj2sktmQYnpo-Tht0k2p84NXAuAb?usp=sharing