changes made

This commit is contained in:
Farhan-2222 2022-10-02 16:19:01 +05:30
parent b785bd7ca9
commit e8f23fd245
3 changed files with 12 additions and 0 deletions

View File

@ -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.

BIN
scripts/PNG_To_PDF/img.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@ -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