pyPDFeditor-GUI 3.0.6__tar.gz → 3.0.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/PKG-INFO +5 -5
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/README.md +4 -4
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pyPDFeditor_GUI.egg-info/PKG-INFO +5 -5
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/__init__.py +1 -1
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/application.py +9 -3
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/functions.py +17 -14
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/LICENSE +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pyPDFeditor_GUI.egg-info/SOURCES.txt +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pyPDFeditor_GUI.egg-info/dependency_links.txt +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pyPDFeditor_GUI.egg-info/entry_points.txt +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pyPDFeditor_GUI.egg-info/requires.txt +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pyPDFeditor_GUI.egg-info/top_level.txt +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/__main__.py +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/Add.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/Add_h.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/Add_p.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/Photo.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/__init__.py +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/arrow_move.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/book2.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/chevron_down.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/color.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/color_h.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/color_p.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/delete.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/delete_h.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/delete_p.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/dismiss.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/dismiss_h.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/down.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/down_h.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/down_p.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/edit.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/folder.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/folder_d.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/folder_h.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/folder_p.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/font.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/font_h.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/font_p.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/home.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/lock.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/maximize.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/merge.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/metadata.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/minimize.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/more.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/more_d.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/more_h.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/more_p.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/move_page.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/pdf icon.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/rotate_anticlockwise.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/rotate_clockwise.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/settings.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/settings_h.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/settings_p.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/square_multiple.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/sync.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/sync_h.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/sync_p.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/view.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/view_h.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/view_p.svg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/language.py +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/style_sheets.py +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/window_effect.py +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/windows.py +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/setup.cfg +0 -0
- {pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyPDFeditor-GUI
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.7
|
|
4
4
|
Summary: A desktop application to edit PDF files.
|
|
5
5
|
Home-page: https://github.com/Augus1999/pyPDFeditor-GUI/
|
|
6
6
|
Author: Nianze A. TAO
|
|
@@ -36,16 +36,16 @@ Requires-Dist: PyQt6>=6.7.0
|
|
|
36
36
|

|
|
37
37
|
|
|
38
38
|

|
|
39
|
-

|
|
40
|
+

|
|
41
41
|

|
|
42
42
|
|
|
43
|
-
This project is based on PyQt5 and PyMuPDF and tested on Windows 10 & 11.
|
|
43
|
+
This project is based on PyQt5 and PyMuPDF and tested on Windows 10 & 11 and Ubuntu on WSL2.
|
|
44
44
|
|
|
45
45
|
## Welcome 🎃🎉
|
|
46
46
|
|
|
47
47
|
Welcome to use pyPDFeditor-GUI. pyPDFeditor-GUI is a simple cross-platform application, thanks
|
|
48
|
-
to [Python](https://www.python.org/), [
|
|
48
|
+
to [Python](https://www.python.org/), [PyQt6](https://www.riverbankcomputing.com/software/pyqt/)
|
|
49
49
|
and [PyMuPDF](https://github.com/pymupdf/PyMuPDF), designed to work on simple PDF handling.
|
|
50
50
|
|
|
51
51
|
I tried my best to make it close to Fluent UI. Icons used can be found [🔗here](https://fluenticons.co/).
|
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|

|
|
6
6
|
|
|
7
7
|

|
|
8
|
-

|
|
9
|
+

|
|
10
10
|

|
|
11
11
|
|
|
12
|
-
This project is based on PyQt5 and PyMuPDF and tested on Windows 10 & 11.
|
|
12
|
+
This project is based on PyQt5 and PyMuPDF and tested on Windows 10 & 11 and Ubuntu on WSL2.
|
|
13
13
|
|
|
14
14
|
## Welcome 🎃🎉
|
|
15
15
|
|
|
16
16
|
Welcome to use pyPDFeditor-GUI. pyPDFeditor-GUI is a simple cross-platform application, thanks
|
|
17
|
-
to [Python](https://www.python.org/), [
|
|
17
|
+
to [Python](https://www.python.org/), [PyQt6](https://www.riverbankcomputing.com/software/pyqt/)
|
|
18
18
|
and [PyMuPDF](https://github.com/pymupdf/PyMuPDF), designed to work on simple PDF handling.
|
|
19
19
|
|
|
20
20
|
I tried my best to make it close to Fluent UI. Icons used can be found [🔗here](https://fluenticons.co/).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pyPDFeditor-GUI
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.7
|
|
4
4
|
Summary: A desktop application to edit PDF files.
|
|
5
5
|
Home-page: https://github.com/Augus1999/pyPDFeditor-GUI/
|
|
6
6
|
Author: Nianze A. TAO
|
|
@@ -36,16 +36,16 @@ Requires-Dist: PyQt6>=6.7.0
|
|
|
36
36
|

|
|
37
37
|
|
|
38
38
|

|
|
39
|
-

|
|
40
|
+

|
|
41
41
|

|
|
42
42
|
|
|
43
|
-
This project is based on PyQt5 and PyMuPDF and tested on Windows 10 & 11.
|
|
43
|
+
This project is based on PyQt5 and PyMuPDF and tested on Windows 10 & 11 and Ubuntu on WSL2.
|
|
44
44
|
|
|
45
45
|
## Welcome 🎃🎉
|
|
46
46
|
|
|
47
47
|
Welcome to use pyPDFeditor-GUI. pyPDFeditor-GUI is a simple cross-platform application, thanks
|
|
48
|
-
to [Python](https://www.python.org/), [
|
|
48
|
+
to [Python](https://www.python.org/), [PyQt6](https://www.riverbankcomputing.com/software/pyqt/)
|
|
49
49
|
and [PyMuPDF](https://github.com/pymupdf/PyMuPDF), designed to work on simple PDF handling.
|
|
50
50
|
|
|
51
51
|
I tried my best to make it close to Fluent UI. Icons used can be found [🔗here](https://fluenticons.co/).
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
wrap the whole application to one function
|
|
5
5
|
"""
|
|
6
6
|
import os
|
|
7
|
+
import sys
|
|
7
8
|
import json
|
|
8
9
|
import shutil
|
|
9
10
|
import getpass
|
|
@@ -698,6 +699,7 @@ class FontDialog(FontDialogR):
|
|
|
698
699
|
"""
|
|
699
700
|
display the font
|
|
700
701
|
"""
|
|
702
|
+
font_file = self.name_dict[self.combobox.currentText()]
|
|
701
703
|
doc = fitz.Document()
|
|
702
704
|
fitz.utils.new_page(doc, -1, 380, 220)
|
|
703
705
|
r1 = fitz.Rect(10, 10, 370, 210)
|
|
@@ -711,8 +713,8 @@ class FontDialog(FontDialogR):
|
|
|
711
713
|
color=(0.24, 0.24, 0.24),
|
|
712
714
|
align=1,
|
|
713
715
|
fontsize=25,
|
|
714
|
-
fontfile=
|
|
715
|
-
fontname="ext_0",
|
|
716
|
+
fontfile=None if font_file == "" else font_file,
|
|
717
|
+
fontname="helv" if font_file == "" else "ext_0",
|
|
716
718
|
)
|
|
717
719
|
shape.commit()
|
|
718
720
|
cover = render_pdf_page(page)
|
|
@@ -749,7 +751,11 @@ def remove() -> None:
|
|
|
749
751
|
"""
|
|
750
752
|
c = input("Are you sure to remove the whole application? n/Y" "\n>>>")
|
|
751
753
|
if c.lower() == "y":
|
|
752
|
-
|
|
754
|
+
if sys.executable:
|
|
755
|
+
cmd = f"{sys.executable} -m "
|
|
756
|
+
else:
|
|
757
|
+
cmd = ""
|
|
758
|
+
sp.call(f"{cmd}pip uninstall pypdfeditor-gui", shell=True)
|
|
753
759
|
if os.path.exists(app_home):
|
|
754
760
|
shutil.rmtree(app_home)
|
|
755
761
|
print("process finished")
|
|
@@ -152,7 +152,7 @@ def add_watermark(
|
|
|
152
152
|
font_size: int,
|
|
153
153
|
font_file: str,
|
|
154
154
|
opacity: float = 0.5,
|
|
155
|
-
position: Tuple[int] = (0, 0),
|
|
155
|
+
position: Tuple[int, int] = (0, 0),
|
|
156
156
|
) -> Union[Doc, Document]:
|
|
157
157
|
"""
|
|
158
158
|
add watermark
|
|
@@ -182,8 +182,8 @@ def add_watermark(
|
|
|
182
182
|
stroke_opacity=0.5,
|
|
183
183
|
fill_opacity=opacity,
|
|
184
184
|
align=1,
|
|
185
|
-
fontfile=font_file,
|
|
186
|
-
fontname=os.path.basename(font_file),
|
|
185
|
+
fontfile=None if font_file == "" else font_file,
|
|
186
|
+
fontname="helv" if font_file == "" else os.path.basename(font_file),
|
|
187
187
|
morph=(pos0, Matrix(rotate)),
|
|
188
188
|
)
|
|
189
189
|
shape.commit()
|
|
@@ -768,17 +768,20 @@ def find_font(font_dirs: List) -> Tuple[dict]:
|
|
|
768
768
|
:return: two dictionaries => {font name: font file address} &
|
|
769
769
|
{font file address: font name}
|
|
770
770
|
"""
|
|
771
|
-
name_dict = {}
|
|
772
|
-
dir_dict = {}
|
|
773
|
-
|
|
774
|
-
for
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
771
|
+
name_dict = {"default": ""}
|
|
772
|
+
dir_dict = {"": "default"}
|
|
773
|
+
try:
|
|
774
|
+
for font_dir in font_dirs:
|
|
775
|
+
for file_name in os.listdir(font_dir):
|
|
776
|
+
full_name = os.path.join(font_dir, file_name)
|
|
777
|
+
try:
|
|
778
|
+
font_name = Font(fontfile=full_name).name
|
|
779
|
+
name_dict[font_name] = str(Path(full_name))
|
|
780
|
+
dir_dict[str(Path(full_name))] = font_name
|
|
781
|
+
except FzErrorLibrary:
|
|
782
|
+
pass
|
|
783
|
+
except FileNotFoundError:
|
|
784
|
+
...
|
|
782
785
|
return name_dict, dir_dict
|
|
783
786
|
|
|
784
787
|
|
|
File without changes
|
|
File without changes
|
{pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pyPDFeditor_GUI.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pypdfeditor_gui-3.0.6 → pypdfeditor_gui-3.0.7}/pypdfeditor_core/icons/rotate_anticlockwise.svg
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|