Skip to content

Commit 14f5438

Browse files
authored
Update README.md
1 parent 22fb377 commit 14f5438

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,28 @@ This script works by first converting the .bmp files to .png files and then writ
1515
* cv2 is used to process and handle the image files.
1616
* tkinter is used in the standalone process for easy folder selection.
1717

18+
Install these dependencies like so:
19+
20+
```CommandPrompt
21+
python -m pip install natsort fpdf opencv-python
22+
```
23+
[Tkinter](https://docs.python.org/3/library/tkinter.html) should already be included in the defualt Python installation.
24+
1825
# Arguments
1926
The function requires the following arguments:
2027
* bmp_folder: This should be a directory path (string) leading to the directory containing the .bmp files you want to convert.
2128
* save_path: This should be a directory path (string) leading to the directory in which you want to save the PDF. This can be the same as bmp_path or different.
2229
* pdf_name: This should be a string containing the desired name of your PDF. If this name is missing the .pdf extension, it will automatically be added.
2330
* save_png: Boolean. This script converts the .bmp images to .png images before adding them to the PDF. If you wish to save the .png versions of the images in addition to the PDF, set this value to 1.
2431

32+
So a call to this function should look like:
33+
```Python
34+
bmp2pdf(bmpd_folder, save_path, pdf_name, 0);
35+
```
36+
or
37+
```Python
38+
bmp2pdf(bmpd_folder, save_path, pdf_name, 1);
39+
```
2540

2641
# Copyright
2742
NotMyMajor/Python-Bitmaps-to-PDF is licensed under the

0 commit comments

Comments
 (0)