diff --git a/scripts/PNG_To_PDF/README.md b/scripts/PNG_To_PDF/README.md new file mode 100644 index 0000000..700574f --- /dev/null +++ b/scripts/PNG_To_PDF/README.md @@ -0,0 +1,7 @@ +This script consist of python code which converts PNG to PDF. + +It has a PNG image to use as example. For using this code just write url of different image which you want to use under image1 variable. + +Write the location of the PDF to be saved at in the memory under "impdf.save". + +I have used flake8 linting on this as well. \ No newline at end of file diff --git a/scripts/PNG_To_PDF/img.png b/scripts/PNG_To_PDF/img.png new file mode 100644 index 0000000..4c74a66 Binary files /dev/null and b/scripts/PNG_To_PDF/img.png differ diff --git a/scripts/PNG_To_PDF/png-to-pdf.py b/scripts/PNG_To_PDF/png-to-pdf.py new file mode 100644 index 0000000..212b2f0 --- /dev/null +++ b/scripts/PNG_To_PDF/png-to-pdf.py @@ -0,0 +1,5 @@ +from PIL import Image + +image1 = Image.open(r'png-to-pdf.png') +impdf = image1.convert('RGB') +impdf.save(r'png-to-pdf.pdf') # noqa \ No newline at end of file