You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,13 +15,28 @@ This script works by first converting the .bmp files to .png files and then writ
15
15
* cv2 is used to process and handle the image files.
16
16
* tkinter is used in the standalone process for easy folder selection.
17
17
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
+
18
25
# Arguments
19
26
The function requires the following arguments:
20
27
* bmp_folder: This should be a directory path (string) leading to the directory containing the .bmp files you want to convert.
21
28
* 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.
22
29
* 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.
23
30
* 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.
24
31
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
+
```
25
40
26
41
# Copyright
27
42
NotMyMajor/Python-Bitmaps-to-PDF is licensed under the
0 commit comments