pdfine 1.0.0__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.
@@ -0,0 +1,230 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ #Miscellaneous
10
+ WTSpace/
11
+ merged_pdf/
12
+ pdf_files/
13
+ Samples/
14
+ .idea/
15
+ # Default ignored files
16
+ /shelf/
17
+ /workspace.xml
18
+ # Editor-based HTTP Client requests
19
+ /httpRequests/
20
+
21
+ # Distribution / packaging
22
+ .Python
23
+ build/
24
+ develop-eggs/
25
+ dist/
26
+ downloads/
27
+ eggs/
28
+ .eggs/
29
+ lib/
30
+ lib64/
31
+ parts/
32
+ sdist/
33
+ var/
34
+ wheels/
35
+ share/python-wheels/
36
+ *.egg-info/
37
+ .installed.cfg
38
+ *.egg
39
+ MANIFEST
40
+
41
+ # PyInstaller
42
+ # Usually these files are written by a python script from a template
43
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
44
+ *.manifest
45
+ *.spec
46
+
47
+ # Installer logs
48
+ pip-log.txt
49
+ pip-delete-this-directory.txt
50
+
51
+ # Unit test / coverage reports
52
+ htmlcov/
53
+ .tox/
54
+ .nox/
55
+ .coverage
56
+ .coverage.*
57
+ .cache
58
+ nosetests.xml
59
+ coverage.xml
60
+ *.cover
61
+ *.py.cover
62
+ .hypothesis/
63
+ .pytest_cache/
64
+ cover/
65
+
66
+ # Translations
67
+ *.mo
68
+ *.pot
69
+
70
+ # Django stuff:
71
+ *.log
72
+ local_settings.py
73
+ db.sqlite3
74
+ db.sqlite3-journal
75
+
76
+ # Flask stuff:
77
+ instance/
78
+ .webassets-cache
79
+
80
+ # Scrapy stuff:
81
+ .scrapy
82
+
83
+ # Sphinx documentation
84
+ docs/_build/
85
+
86
+ # PyBuilder
87
+ .pybuilder/
88
+ target/
89
+
90
+ # Jupyter Notebook
91
+ .ipynb_checkpoints
92
+
93
+ # IPython
94
+ profile_default/
95
+ ipython_config.py
96
+
97
+ # pyenv
98
+ # For a library or package, you might want to ignore these files since the code is
99
+ # intended to run in multiple environments; otherwise, check them in:
100
+ # .python-version
101
+
102
+ # pipenv
103
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
104
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
105
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
106
+ # install all needed dependencies.
107
+ # Pipfile.lock
108
+
109
+ # UV
110
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
111
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
112
+ # commonly ignored for libraries.
113
+ # uv.lock
114
+
115
+ # poetry
116
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
117
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
118
+ # commonly ignored for libraries.
119
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
120
+ # poetry.lock
121
+ # poetry.toml
122
+
123
+ # pdm
124
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
125
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
126
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
127
+ # pdm.lock
128
+ # pdm.toml
129
+ .pdm-python
130
+ .pdm-build/
131
+
132
+ # pixi
133
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
134
+ # pixi.lock
135
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
136
+ # in the .venv directory. It is recommended not to include this directory in version control.
137
+ .pixi
138
+
139
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
140
+ __pypackages__/
141
+
142
+ # Celery stuff
143
+ celerybeat-schedule
144
+ celerybeat.pid
145
+
146
+ # Redis
147
+ *.rdb
148
+ *.aof
149
+ *.pid
150
+
151
+ # RabbitMQ
152
+ mnesia/
153
+ rabbitmq/
154
+ rabbitmq-data/
155
+
156
+ # ActiveMQ
157
+ activemq-data/
158
+
159
+ # SageMath parsed files
160
+ *.sage.py
161
+
162
+ # Environments
163
+ .env
164
+ .envrc
165
+ .venv
166
+ env/
167
+ venv/
168
+ ENV/
169
+ env.bak/
170
+ venv.bak/
171
+
172
+ # Spyder project settings
173
+ .spyderproject
174
+ .spyproject
175
+
176
+ # Rope project settings
177
+ .ropeproject
178
+
179
+ # mkdocs documentation
180
+ /site
181
+
182
+ # mypy
183
+ .mypy_cache/
184
+ .dmypy.json
185
+ dmypy.json
186
+
187
+ # Pyre type checker
188
+ .pyre/
189
+
190
+ # pytype static type analyzer
191
+ .pytype/
192
+
193
+ # Cython debug symbols
194
+ cython_debug/
195
+
196
+ # PyCharm
197
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
198
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
199
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
200
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
201
+ # .idea/
202
+
203
+ # Abstra
204
+ # Abstra is an AI-powered process automation framework.
205
+ # Ignore directories containing user credentials, local state, and settings.
206
+ # Learn more at https://abstra.io/docs
207
+ .abstra/
208
+
209
+ # Visual Studio Code
210
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
211
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
212
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
213
+ # you could uncomment the following to ignore the entire vscode folder
214
+ # .vscode/
215
+ # Temporary file for partial code execution
216
+ tempCodeRunnerFile.py
217
+
218
+ # Ruff stuff:
219
+ .ruff_cache/
220
+
221
+ # PyPI configuration file
222
+ .pypirc
223
+
224
+ # Marimo
225
+ marimo/_static/
226
+ marimo/_lsp/
227
+ __marimo__/
228
+
229
+ # Streamlit
230
+ .streamlit/secrets.toml
@@ -0,0 +1,97 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ## [1.0.0] - 2026-09-14
11
+
12
+ ### Added
13
+
14
+ - Add single item delete option in the Edit menu.
15
+ - Add single item delete option to context menu which pop-Up on right click action
16
+ only in the listbox.
17
+
18
+ ### Changed
19
+
20
+ - Change the main menu layout.
21
+
22
+ ## [1.0.0-rc.1] - 2026-08-30
23
+
24
+ ### Changed
25
+
26
+ - Improvement to the way files are display to the users in the GUI.
27
+
28
+ ### Fixed
29
+
30
+ - Fix typo in the License file.
31
+ - Fix Markdown indentation and grammar errors in the readme file.
32
+
33
+ ## [1.0.0-rc.0] - 2026-07-19
34
+
35
+ ### Added
36
+
37
+ - Add entry point for simpler execution.
38
+
39
+ ## [0.5.1] - 2026-07-16
40
+
41
+ ### Fixed
42
+
43
+ - Add pillow library to fix images compression error.
44
+
45
+ ## [0.5.0] - 2026-07-16
46
+
47
+ ### Added
48
+
49
+ - Add PDF Content Streams compression function.
50
+ - Add PDF image quality compression function.
51
+
52
+ ## [0.4.1] - 2026-07-06
53
+
54
+ ### Fixed
55
+
56
+ - Fix favicon path.
57
+
58
+ ## [0.4.0] - 2026-07-06
59
+
60
+ ### Added
61
+
62
+ - Add Favicon to the GUI.
63
+
64
+ ## [0.3.0] - 2026-07-06
65
+
66
+ ### Added
67
+
68
+ - Add exit menu button.
69
+
70
+ ## [0.2.0] - 2026-07-06
71
+
72
+ ### Added
73
+
74
+ - Add the option of adding files.
75
+ - Add the option to merge PDF.
76
+ - Add option to clear files.
77
+
78
+ ## [0.1.0] - 2026-07-06
79
+
80
+ Creates the first version of the GUI for user to interact with
81
+ PDF files.
82
+
83
+ ### Added
84
+
85
+ - Add the GUI for users interaction.
86
+
87
+ [Unreleased]: https://github.com/KreoleCoder/pdfine/compare/v1.0.0...HEAD
88
+ [1.0.0]: https://github.com/KreoleCoder/pdfine/compare/v1.0.0rc1...v1.0.0
89
+ [1.0.0-rc.1]: https://github.com/KreoleCoder/pdfine/compare/v1.0.0rc0...v1.0.0rc1
90
+ [1.0.0-rc.0]: https://github.com/KreoleCoder/pdfine/compare/v0.5.1...v1.0.0rc0
91
+ [0.5.1]: https://github.com/KreoleCoder/pdfine/compare/v0.5.0...v0.5.1
92
+ [0.5.0]: https://github.com/KreoleCoder/pdfine/compare/v0.4.1...v0.5.0
93
+ [0.4.1]: https://github.com/KreoleCoder/pdfine/compare/v0.4.0...v0.4.1
94
+ [0.4.0]: https://github.com/KreoleCoder/pdfine/compare/v0.3.0...v0.4.0
95
+ [0.3.0]: https://github.com/KreoleCoder/pdfine/compare/v0.2.0...v0.3.0
96
+ [0.2.0]: https://github.com/KreoleCoder/pdfine/compare/v0.1.0...v0.2.0
97
+ [0.1.0]: https://github.com/KreoleCoder/pdfine/releases/tag/v0.1.0
@@ -0,0 +1,359 @@
1
+ pdfine - PDF Refiner (editor)
2
+
3
+ Copyright (C) 2026-Present Shall Mcfield
4
+
5
+ This program is free software; you can redistribute it and/or modify
6
+ it under the terms of the GNU General Public License as published by
7
+ the Free Software Foundation; version 2.
8
+
9
+ This program is distributed in the hope that it will be useful,
10
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ GNU General Public License for more details.
13
+
14
+ You should have received a copy of the GNU General Public License
15
+ along with this program; if not, write to the Free Software
16
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
+
18
+ ---------------------------------------------------------------------------------
19
+
20
+ GNU GENERAL PUBLIC LICENSE
21
+ Version 2, June 1991
22
+
23
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
24
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
25
+ Everyone is permitted to copy and distribute verbatim copies
26
+ of this license document, but changing it is not allowed.
27
+
28
+ Preamble
29
+
30
+ The licenses for most software are designed to take away your
31
+ freedom to share and change it. By contrast, the GNU General Public
32
+ License is intended to guarantee your freedom to share and change free
33
+ software--to make sure the software is free for all its users. This
34
+ General Public License applies to most of the Free Software
35
+ Foundation's software and to any other program whose authors commit to
36
+ using it. (Some other Free Software Foundation software is covered by
37
+ the GNU Lesser General Public License instead.) You can apply it to
38
+ your programs, too.
39
+
40
+ When we speak of free software, we are referring to freedom, not
41
+ price. Our General Public Licenses are designed to make sure that you
42
+ have the freedom to distribute copies of free software (and charge for
43
+ this service if you wish), that you receive source code or can get it
44
+ if you want it, that you can change the software or use pieces of it
45
+ in new free programs; and that you know you can do these things.
46
+
47
+ To protect your rights, we need to make restrictions that forbid
48
+ anyone to deny you these rights or to ask you to surrender the rights.
49
+ These restrictions translate to certain responsibilities for you if you
50
+ distribute copies of the software, or if you modify it.
51
+
52
+ For example, if you distribute copies of such a program, whether
53
+ gratis or for a fee, you must give the recipients all the rights that
54
+ you have. You must make sure that they, too, receive or can get the
55
+ source code. And you must show them these terms so they know their
56
+ rights.
57
+
58
+ We protect your rights with two steps: (1) copyright the software, and
59
+ (2) offer you this license which gives you legal permission to copy,
60
+ distribute and/or modify the software.
61
+
62
+ Also, for each author's protection and ours, we want to make certain
63
+ that everyone understands that there is no warranty for this free
64
+ software. If the software is modified by someone else and passed on, we
65
+ want its recipients to know that what they have is not the original, so
66
+ that any problems introduced by others will not reflect on the original
67
+ authors' reputations.
68
+
69
+ Finally, any free program is threatened constantly by software
70
+ patents. We wish to avoid the danger that redistributors of a free
71
+ program will individually obtain patent licenses, in effect making the
72
+ program proprietary. To prevent this, we have made it clear that any
73
+ patent must be licensed for everyone's free use or not licensed at all.
74
+
75
+ The precise terms and conditions for copying, distribution and
76
+ modification follow.
77
+
78
+ GNU GENERAL PUBLIC LICENSE
79
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
80
+
81
+ 0. This License applies to any program or other work which contains
82
+ a notice placed by the copyright holder saying it may be distributed
83
+ under the terms of this General Public License. The "Program", below,
84
+ refers to any such program or work, and a "work based on the Program"
85
+ means either the Program or any derivative work under copyright law:
86
+ that is to say, a work containing the Program or a portion of it,
87
+ either verbatim or with modifications and/or translated into another
88
+ language. (Hereinafter, translation is included without limitation in
89
+ the term "modification".) Each licensee is addressed as "you".
90
+
91
+ Activities other than copying, distribution and modification are not
92
+ covered by this License; they are outside its scope. The act of
93
+ running the Program is not restricted, and the output from the Program
94
+ is covered only if its contents constitute a work based on the
95
+ Program (independent of having been made by running the Program).
96
+ Whether that is true depends on what the Program does.
97
+
98
+ 1. You may copy and distribute verbatim copies of the Program's
99
+ source code as you receive it, in any medium, provided that you
100
+ conspicuously and appropriately publish on each copy an appropriate
101
+ copyright notice and disclaimer of warranty; keep intact all the
102
+ notices that refer to this License and to the absence of any warranty;
103
+ and give any other recipients of the Program a copy of this License
104
+ along with the Program.
105
+
106
+ You may charge a fee for the physical act of transferring a copy, and
107
+ you may at your option offer warranty protection in exchange for a fee.
108
+
109
+ 2. You may modify your copy or copies of the Program or any portion
110
+ of it, thus forming a work based on the Program, and copy and
111
+ distribute such modifications or work under the terms of Section 1
112
+ above, provided that you also meet all of these conditions:
113
+
114
+ a) You must cause the modified files to carry prominent notices
115
+ stating that you changed the files and the date of any change.
116
+
117
+ b) You must cause any work that you distribute or publish, that in
118
+ whole or in part contains or is derived from the Program or any
119
+ part thereof, to be licensed as a whole at no charge to all third
120
+ parties under the terms of this License.
121
+
122
+ c) If the modified program normally reads commands interactively
123
+ when run, you must cause it, when started running for such
124
+ interactive use in the most ordinary way, to print or display an
125
+ announcement including an appropriate copyright notice and a
126
+ notice that there is no warranty (or else, saying that you provide
127
+ a warranty) and that users may redistribute the program under
128
+ these conditions, and telling the user how to view a copy of this
129
+ License. (Exception: if the Program itself is interactive but
130
+ does not normally print such an announcement, your work based on
131
+ the Program is not required to print an announcement.)
132
+
133
+ These requirements apply to the modified work as a whole. If
134
+ identifiable sections of that work are not derived from the Program,
135
+ and can be reasonably considered independent and separate works in
136
+ themselves, then this License, and its terms, do not apply to those
137
+ sections when you distribute them as separate works. But when you
138
+ distribute the same sections as part of a whole which is a work based
139
+ on the Program, the distribution of the whole must be on the terms of
140
+ this License, whose permissions for other licensees extend to the
141
+ entire whole, and thus to each and every part regardless of who wrote it.
142
+
143
+ Thus, it is not the intent of this section to claim rights or contest
144
+ your rights to work written entirely by you; rather, the intent is to
145
+ exercise the right to control the distribution of derivative or
146
+ collective works based on the Program.
147
+
148
+ In addition, mere aggregation of another work not based on the Program
149
+ with the Program (or with a work based on the Program) on a volume of
150
+ a storage or distribution medium does not bring the other work under
151
+ the scope of this License.
152
+
153
+ 3. You may copy and distribute the Program (or a work based on it,
154
+ under Section 2) in object code or executable form under the terms of
155
+ Sections 1 and 2 above provided that you also do one of the following:
156
+
157
+ a) Accompany it with the complete corresponding machine-readable
158
+ source code, which must be distributed under the terms of Sections
159
+ 1 and 2 above on a medium customarily used for software interchange; or,
160
+
161
+ b) Accompany it with a written offer, valid for at least three
162
+ years, to give any third party, for a charge no more than your
163
+ cost of physically performing source distribution, a complete
164
+ machine-readable copy of the corresponding source code, to be
165
+ distributed under the terms of Sections 1 and 2 above on a medium
166
+ customarily used for software interchange; or,
167
+
168
+ c) Accompany it with the information you received as to the offer
169
+ to distribute corresponding source code. (This alternative is
170
+ allowed only for noncommercial distribution and only if you
171
+ received the program in object code or executable form with such
172
+ an offer, in accord with Subsection b above.)
173
+
174
+ The source code for a work means the preferred form of the work for
175
+ making modifications to it. For an executable work, complete source
176
+ code means all the source code for all modules it contains, plus any
177
+ associated interface definition files, plus the scripts used to
178
+ control compilation and installation of the executable. However, as a
179
+ special exception, the source code distributed need not include
180
+ anything that is normally distributed (in either source or binary
181
+ form) with the major components (compiler, kernel, and so on) of the
182
+ operating system on which the executable runs, unless that component
183
+ itself accompanies the executable.
184
+
185
+ If distribution of executable or object code is made by offering
186
+ access to copy from a designated place, then offering equivalent
187
+ access to copy the source code from the same place counts as
188
+ distribution of the source code, even though third parties are not
189
+ compelled to copy the source along with the object code.
190
+
191
+ 4. You may not copy, modify, sublicense, or distribute the Program
192
+ except as expressly provided under this License. Any attempt
193
+ otherwise to copy, modify, sublicense or distribute the Program is
194
+ void, and will automatically terminate your rights under this License.
195
+ However, parties who have received copies, or rights, from you under
196
+ this License will not have their licenses terminated so long as such
197
+ parties remain in full compliance.
198
+
199
+ 5. You are not required to accept this License, since you have not
200
+ signed it. However, nothing else grants you permission to modify or
201
+ distribute the Program or its derivative works. These actions are
202
+ prohibited by law if you do not accept this License. Therefore, by
203
+ modifying or distributing the Program (or any work based on the
204
+ Program), you indicate your acceptance of this License to do so, and
205
+ all its terms and conditions for copying, distributing or modifying
206
+ the Program or works based on it.
207
+
208
+ 6. Each time you redistribute the Program (or any work based on the
209
+ Program), the recipient automatically receives a license from the
210
+ original licensor to copy, distribute or modify the Program subject to
211
+ these terms and conditions. You may not impose any further
212
+ restrictions on the recipients' exercise of the rights granted herein.
213
+ You are not responsible for enforcing compliance by third parties to
214
+ this License.
215
+
216
+ 7. If, as a consequence of a court judgment or allegation of patent
217
+ infringement or for any other reason (not limited to patent issues),
218
+ conditions are imposed on you (whether by court order, agreement or
219
+ otherwise) that contradict the conditions of this License, they do not
220
+ excuse you from the conditions of this License. If you cannot
221
+ distribute so as to satisfy simultaneously your obligations under this
222
+ License and any other pertinent obligations, then as a consequence you
223
+ may not distribute the Program at all. For example, if a patent
224
+ license would not permit royalty-free redistribution of the Program by
225
+ all those who receive copies directly or indirectly through you, then
226
+ the only way you could satisfy both it and this License would be to
227
+ refrain entirely from distribution of the Program.
228
+
229
+ If any portion of this section is held invalid or unenforceable under
230
+ any particular circumstance, the balance of the section is intended to
231
+ apply and the section as a whole is intended to apply in other
232
+ circumstances.
233
+
234
+ It is not the purpose of this section to induce you to infringe any
235
+ patents or other property right claims or to contest validity of any
236
+ such claims; this section has the sole purpose of protecting the
237
+ integrity of the free software distribution system, which is
238
+ implemented by public license practices. Many people have made
239
+ generous contributions to the wide range of software distributed
240
+ through that system in reliance on consistent application of that
241
+ system; it is up to the author/donor to decide if he or she is willing
242
+ to distribute software through any other system and a licensee cannot
243
+ impose that choice.
244
+
245
+ This section is intended to make thoroughly clear what is believed to
246
+ be a consequence of the rest of this License.
247
+
248
+ 8. If the distribution and/or use of the Program is restricted in
249
+ certain countries either by patents or by copyrighted interfaces, the
250
+ original copyright holder who places the Program under this License
251
+ may add an explicit geographical distribution limitation excluding
252
+ those countries, so that distribution is permitted only in or among
253
+ countries not thus excluded. In such case, this License incorporates
254
+ the limitation as if written in the body of this License.
255
+
256
+ 9. The Free Software Foundation may publish revised and/or new versions
257
+ of the General Public License from time to time. Such new versions will
258
+ be similar in spirit to the present version, but may differ in detail to
259
+ address new problems or concerns.
260
+
261
+ Each version is given a distinguishing version number. If the Program
262
+ specifies a version number of this License which applies to it and "any
263
+ later version", you have the option of following the terms and conditions
264
+ either of that version or of any later version published by the Free
265
+ Software Foundation. If the Program does not specify a version number of
266
+ this License, you may choose any version ever published by the Free Software
267
+ Foundation.
268
+
269
+ 10. If you wish to incorporate parts of the Program into other free
270
+ programs whose distribution conditions are different, write to the author
271
+ to ask for permission. For software which is copyrighted by the Free
272
+ Software Foundation, write to the Free Software Foundation; we sometimes
273
+ make exceptions for this. Our decision will be guided by the two goals
274
+ of preserving the free status of all derivatives of our free software and
275
+ of promoting the sharing and reuse of software generally.
276
+
277
+ NO WARRANTY
278
+
279
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
280
+ FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
281
+ OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
282
+ PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
283
+ OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
284
+ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
285
+ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
286
+ PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
287
+ REPAIR OR CORRECTION.
288
+
289
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
290
+ WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
291
+ REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
292
+ INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
293
+ OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
294
+ TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
295
+ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
296
+ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
297
+ POSSIBILITY OF SUCH DAMAGES.
298
+
299
+ END OF TERMS AND CONDITIONS
300
+
301
+ How to Apply These Terms to Your New Programs
302
+
303
+ If you develop a new program, and you want it to be of the greatest
304
+ possible use to the public, the best way to achieve this is to make it
305
+ free software which everyone can redistribute and change under these terms.
306
+
307
+ To do so, attach the following notices to the program. It is safest
308
+ to attach them to the start of each source file to most effectively
309
+ convey the exclusion of warranty; and each file should have at least
310
+ the "copyright" line and a pointer to where the full notice is found.
311
+
312
+ <one line to give the program's name and a brief idea of what it does.>
313
+ Copyright (C) <year> <name of author>
314
+
315
+ This program is free software; you can redistribute it and/or modify
316
+ it under the terms of the GNU General Public License as published by
317
+ the Free Software Foundation; either version 2 of the License, or
318
+ (at your option) any later version.
319
+
320
+ This program is distributed in the hope that it will be useful,
321
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
322
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
323
+ GNU General Public License for more details.
324
+
325
+ You should have received a copy of the GNU General Public License along
326
+ with this program; if not, write to the Free Software Foundation, Inc.,
327
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
328
+
329
+ Also add information on how to contact you by electronic and paper mail.
330
+
331
+ If the program is interactive, make it output a short notice like this
332
+ when it starts in an interactive mode:
333
+
334
+ Gnomovision version 69, Copyright (C) year name of author
335
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
336
+ This is free software, and you are welcome to redistribute it
337
+ under certain conditions; type `show c' for details.
338
+
339
+ The hypothetical commands `show w' and `show c' should show the appropriate
340
+ parts of the General Public License. Of course, the commands you use may
341
+ be called something other than `show w' and `show c'; they could even be
342
+ mouse-clicks or menu items--whatever suits your program.
343
+
344
+ You should also get your employer (if you work as a programmer) or your
345
+ school, if any, to sign a "copyright disclaimer" for the program, if
346
+ necessary. Here is a sample; alter the names:
347
+
348
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
349
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
350
+
351
+ <signature of Ty Coon>, 1 April 1989
352
+ Ty Coon, President of Vice
353
+
354
+ This General Public License does not permit incorporating your program into
355
+ proprietary programs. If your program is a subroutine library, you may
356
+ consider it more useful to permit linking proprietary applications with the
357
+ library. If this is what you want to do, use the GNU Lesser General
358
+ Public License instead of this License.
359
+
pdfine-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,148 @@
1
+ Metadata-Version: 2.4
2
+ Name: pdfine
3
+ Version: 1.0.0
4
+ Summary: Free and open source pdf editor
5
+ Project-URL: Documentation, https://github.com/KreoleCoder/pdfine#readme
6
+ Project-URL: Issues, https://github.com/KreoleCoder/pdfine/issues
7
+ Project-URL: Source, https://github.com/KreoleCoder/pdfine
8
+ Author-email: Shall Mcfield <xhall.mc+kreolecoder@proton.me>
9
+ License-Expression: GPL-2.0
10
+ License-File: LICENSE.txt
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Programming Language :: Python
13
+ Classifier: Programming Language :: Python :: 3.8
14
+ Classifier: Programming Language :: Python :: 3.9
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: Implementation :: CPython
19
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
20
+ Requires-Python: >=3.8
21
+ Requires-Dist: pillow>=12.3.0
22
+ Requires-Dist: pypdf>=6.14.2
23
+ Requires-Dist: typing-extensions>=4.16.0
24
+ Description-Content-Type: text/markdown
25
+
26
+ # PDFine
27
+
28
+ [![PyPI - Version](https://img.shields.io/pypi/v/pdfine?label=pypi%20package&labelColor=green&color=8A2BE2)](https://pypi.org/project/pdfine)
29
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pdfine?labelColor=green&color=8A2BE2)](https://pypi.org/project/pdfine)
30
+ [![PyPI License](https://img.shields.io/pypi/l/pdfine?labelColor=green&color=8A2BE2)](https://pypi.org/project/pdfine)
31
+ [![PyPI Wheel](https://img.shields.io/pypi/wheel/pdfine?style=plastic&labelColor=green&color=8A2BE2)](https://pypi.org/project/pdfine/#files)
32
+ -----
33
+
34
+ ## Table of Contents
35
+
36
+ - [Overview](#overview)
37
+ - [Installation](#installation)
38
+ - [Usage](#usage)
39
+ - [Disclaimer](#disclaimer)
40
+ - [License](#license)
41
+
42
+ ---
43
+
44
+ ## Overview
45
+
46
+ PDFine is a Free Libre and Open Source PDF editor that enables users to merge and compress PDF files via a desktop graphical
47
+ interface. Built with Python, it provides a lightweight alternative to expensive PDF manipulation software by leveraging the
48
+ PyPDF library for PDF operations.
49
+
50
+ ### Why PDFine
51
+
52
+ PDFine is the combination of:
53
+ - PDF: Portable Document Format; and
54
+ - (F)ine: As in ReFined or ReFiner
55
+
56
+ PDFine is **for now, ver simple**, it does one thing (well actually two things :) ), and try to do it well, it **merges** multiple PDF
57
+ files into one single PDF file and, it **compresses** one or multiple PDF files.
58
+
59
+ ---
60
+
61
+ ## Installation
62
+
63
+ ### Prerequisites
64
+
65
+ - `python` 3.8 or higher
66
+ - `pip` or `pipx` package manager
67
+
68
+ > [!NOTE]
69
+ > On some Linux distros you will be required to install `tkinter` python's standard built-in GUIs library.
70
+
71
+ > ### Recommended
72
+ >
73
+ >
74
+ >```console
75
+ >pipx install pdfine
76
+ >```
77
+ >***This installs PDFine in an isolated environment, preventing dependency conflicts.***
78
+
79
+ > ### Alternative
80
+ >```console
81
+ >pip install pdfine
82
+ >```
83
+
84
+ > ### Standalone installer for Window
85
+ > Coming soon
86
+
87
+ ---
88
+
89
+ ## Usage
90
+
91
+ > Open pdfine app interface, it looks like this.
92
+
93
+ ![main](./asset/doc/img/main_window.png)
94
+
95
+ > There are two menu option `File` and `Edit` </br>
96
+ >
97
+ > To add a file or multiple files select the `File` option and chose `Add`
98
+
99
+ ![file](./asset/doc/img/add_file.png)
100
+
101
+ > Now to Merge multiple PDF files into one single PDF file, select the `Edit`
102
+ > option and chose `Merge`.
103
+
104
+ ![merge](./asset/doc/img/merge_files.png)
105
+
106
+ > There is also the option of compressing one or more PDF files, to achieve
107
+ > this, go to `Edit` and select `Compress`</br>
108
+
109
+ ![compress](./asset/doc/img/compress_files.png)
110
+
111
+ > [!IMPORTANT]
112
+ > Always make sure PDF file is already added before merging or compressing.
113
+
114
+ ---
115
+
116
+ ## Disclaimer
117
+
118
+ This project uses AI as a **productivity tool** limited to documentation,
119
+ commit message and a small portion of code mainly use for sampling the design
120
+ of the GUI. The final content has been reviewed, modified as needed, and
121
+ validated by the author through the project's development and testing process.
122
+
123
+ ### Use of AI-assisted content
124
+
125
+ - **Documentation** - approximately ***10%*** of documentation was assisted
126
+ by AI.
127
+ - **Commit Message** - approximately ***10%*** of commit messages was assisted by AI.
128
+ - **Code** - approximately ***3%*** of the source code was **assisted** by AI
129
+ and **used only for the design sample of the GUI** which was overall
130
+ edited/changed by human. **(Actual AI-assisted source code is <1%)**.
131
+
132
+ > [!NOTE]
133
+ > Note that the commit message, code, ect, has not been written with AI,
134
+ > but only consulted for best practices, use case, and samples.
135
+ > The documentation of this project on the other hand, is being written with
136
+ > the help of AI (the Docs not the README). It was giving to copilot within
137
+ > the Repo to have it generated (pending review and release).
138
+ >
139
+ > **Also note that all AI-assisted and generated material has undergone human
140
+ > review, editing, testing, and approval before release**.
141
+
142
+ ---
143
+
144
+ ## License
145
+
146
+ `pdfine` is distributed under the terms of the [GPL-2.0-only](https://spdx.org/licenses/GPL-2.0-only.html) license.
147
+
148
+ ---
pdfine-1.0.0/README.md ADDED
@@ -0,0 +1,123 @@
1
+ # PDFine
2
+
3
+ [![PyPI - Version](https://img.shields.io/pypi/v/pdfine?label=pypi%20package&labelColor=green&color=8A2BE2)](https://pypi.org/project/pdfine)
4
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pdfine?labelColor=green&color=8A2BE2)](https://pypi.org/project/pdfine)
5
+ [![PyPI License](https://img.shields.io/pypi/l/pdfine?labelColor=green&color=8A2BE2)](https://pypi.org/project/pdfine)
6
+ [![PyPI Wheel](https://img.shields.io/pypi/wheel/pdfine?style=plastic&labelColor=green&color=8A2BE2)](https://pypi.org/project/pdfine/#files)
7
+ -----
8
+
9
+ ## Table of Contents
10
+
11
+ - [Overview](#overview)
12
+ - [Installation](#installation)
13
+ - [Usage](#usage)
14
+ - [Disclaimer](#disclaimer)
15
+ - [License](#license)
16
+
17
+ ---
18
+
19
+ ## Overview
20
+
21
+ PDFine is a Free Libre and Open Source PDF editor that enables users to merge and compress PDF files via a desktop graphical
22
+ interface. Built with Python, it provides a lightweight alternative to expensive PDF manipulation software by leveraging the
23
+ PyPDF library for PDF operations.
24
+
25
+ ### Why PDFine
26
+
27
+ PDFine is the combination of:
28
+ - PDF: Portable Document Format; and
29
+ - (F)ine: As in ReFined or ReFiner
30
+
31
+ PDFine is **for now, ver simple**, it does one thing (well actually two things :) ), and try to do it well, it **merges** multiple PDF
32
+ files into one single PDF file and, it **compresses** one or multiple PDF files.
33
+
34
+ ---
35
+
36
+ ## Installation
37
+
38
+ ### Prerequisites
39
+
40
+ - `python` 3.8 or higher
41
+ - `pip` or `pipx` package manager
42
+
43
+ > [!NOTE]
44
+ > On some Linux distros you will be required to install `tkinter` python's standard built-in GUIs library.
45
+
46
+ > ### Recommended
47
+ >
48
+ >
49
+ >```console
50
+ >pipx install pdfine
51
+ >```
52
+ >***This installs PDFine in an isolated environment, preventing dependency conflicts.***
53
+
54
+ > ### Alternative
55
+ >```console
56
+ >pip install pdfine
57
+ >```
58
+
59
+ > ### Standalone installer for Window
60
+ > Coming soon
61
+
62
+ ---
63
+
64
+ ## Usage
65
+
66
+ > Open pdfine app interface, it looks like this.
67
+
68
+ ![main](./asset/doc/img/main_window.png)
69
+
70
+ > There are two menu option `File` and `Edit` </br>
71
+ >
72
+ > To add a file or multiple files select the `File` option and chose `Add`
73
+
74
+ ![file](./asset/doc/img/add_file.png)
75
+
76
+ > Now to Merge multiple PDF files into one single PDF file, select the `Edit`
77
+ > option and chose `Merge`.
78
+
79
+ ![merge](./asset/doc/img/merge_files.png)
80
+
81
+ > There is also the option of compressing one or more PDF files, to achieve
82
+ > this, go to `Edit` and select `Compress`</br>
83
+
84
+ ![compress](./asset/doc/img/compress_files.png)
85
+
86
+ > [!IMPORTANT]
87
+ > Always make sure PDF file is already added before merging or compressing.
88
+
89
+ ---
90
+
91
+ ## Disclaimer
92
+
93
+ This project uses AI as a **productivity tool** limited to documentation,
94
+ commit message and a small portion of code mainly use for sampling the design
95
+ of the GUI. The final content has been reviewed, modified as needed, and
96
+ validated by the author through the project's development and testing process.
97
+
98
+ ### Use of AI-assisted content
99
+
100
+ - **Documentation** - approximately ***10%*** of documentation was assisted
101
+ by AI.
102
+ - **Commit Message** - approximately ***10%*** of commit messages was assisted by AI.
103
+ - **Code** - approximately ***3%*** of the source code was **assisted** by AI
104
+ and **used only for the design sample of the GUI** which was overall
105
+ edited/changed by human. **(Actual AI-assisted source code is <1%)**.
106
+
107
+ > [!NOTE]
108
+ > Note that the commit message, code, ect, has not been written with AI,
109
+ > but only consulted for best practices, use case, and samples.
110
+ > The documentation of this project on the other hand, is being written with
111
+ > the help of AI (the Docs not the README). It was giving to copilot within
112
+ > the Repo to have it generated (pending review and release).
113
+ >
114
+ > **Also note that all AI-assisted and generated material has undergone human
115
+ > review, editing, testing, and approval before release**.
116
+
117
+ ---
118
+
119
+ ## License
120
+
121
+ `pdfine` is distributed under the terms of the [GPL-2.0-only](https://spdx.org/licenses/GPL-2.0-only.html) license.
122
+
123
+ ---
Binary file
Binary file
Binary file
@@ -0,0 +1,68 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "pdfine"
7
+ dynamic = ["version"]
8
+ description = 'Free and open source pdf editor'
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = "GPL-2.0"
12
+ keywords = []
13
+ authors = [
14
+ { name = "Shall Mcfield", email = "xhall.mc+kreolecoder@proton.me" },
15
+ ]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Programming Language :: Python",
19
+ "Programming Language :: Python :: 3.8",
20
+ "Programming Language :: Python :: 3.9",
21
+ "Programming Language :: Python :: 3.10",
22
+ "Programming Language :: Python :: 3.11",
23
+ "Programming Language :: Python :: 3.12",
24
+ "Programming Language :: Python :: Implementation :: CPython",
25
+ "Programming Language :: Python :: Implementation :: PyPy",
26
+ ]
27
+ dependencies = [
28
+ "pillow>=12.3.0",
29
+ "pypdf>=6.14.2",
30
+ "typing_extensions>=4.16.0",
31
+ ]
32
+
33
+ [project.urls]
34
+ Documentation = "https://github.com/KreoleCoder/pdfine#readme"
35
+ Issues = "https://github.com/KreoleCoder/pdfine/issues"
36
+ Source = "https://github.com/KreoleCoder/pdfine"
37
+
38
+ [tool.hatch.version]
39
+ path = "src/pdfine/__about__.py"
40
+
41
+ [tool.hatch.envs.types]
42
+ extra-dependencies = [
43
+ "mypy>=1.0.0",
44
+ ]
45
+ [tool.hatch.envs.types.scripts]
46
+ check = "mypy --install-types --non-interactive {args:src/pdfine tests}"
47
+
48
+ [tool.coverage.run]
49
+ source_pkgs = ["pdfine", "tests"]
50
+ branch = true
51
+ parallel = true
52
+ omit = [
53
+ "src/pdfine/__about__.py",
54
+ ]
55
+
56
+ [tool.coverage.paths]
57
+ pdfine = ["src/pdfine", "*/pdfine/src/pdfine"]
58
+ tests = ["tests", "*/pdfine/tests"]
59
+
60
+ [tool.coverage.report]
61
+ exclude_lines = [
62
+ "no cov",
63
+ "if __name__ == .__main__.:",
64
+ "if TYPE_CHECKING:",
65
+ ]
66
+
67
+ [project.gui-scripts]
68
+ pdfine = "pdfine.pdfine_gui:gui_app"
@@ -0,0 +1,3 @@
1
+ pillow==12.3.0
2
+ pypdf==6.14.2
3
+ typing_extensions==4.16.0
@@ -0,0 +1 @@
1
+ __version__ = "1.0.0"
@@ -0,0 +1 @@
1
+ #Define a py package
@@ -0,0 +1,5 @@
1
+
2
+ from pdfine.pdfine_gui import gui_app
3
+
4
+ if __name__ == "__main__":
5
+ gui_app()
@@ -0,0 +1,9 @@
1
+
2
+ def pdfs_compressor(compress):
3
+ compress_level = 6 #Set the level of compression 0-9
4
+ img_quality = 10 #Define the quality of images 0-100
5
+
6
+ for page in compress.pages:
7
+ for img in page.images:
8
+ img.replace(img.image, quality=img_quality)
9
+ page.compress_content_streams(level=compress_level)
@@ -0,0 +1,76 @@
1
+
2
+ from tkinter import filedialog, messagebox
3
+ from pypdf import PdfWriter
4
+ from pdfine.pdfine_merge import pdfs_merger
5
+ from pdfine.pdfine_compress import pdfs_compressor
6
+
7
+ # Import for test code.
8
+ # from pathlib import Path
9
+
10
+ file_list = []
11
+
12
+ def add_files():
13
+ files = filedialog.askopenfilenames(
14
+ title="Select PDF files",
15
+ filetypes=[("PDF Files", "*.pdf")]
16
+ )
17
+
18
+ for file in files:
19
+ file_list.append(file)
20
+ return files
21
+
22
+
23
+ def merge_pdfs():
24
+ if not file_list:
25
+ messagebox.showwarning("No Files", "Please add PDF files first.")
26
+ return
27
+
28
+ output_file = filedialog.asksaveasfilename(
29
+ defaultextension=".pdf",
30
+ filetypes=[("PDF Files", "*.pdf")],
31
+ title="Save Merged PDF As"
32
+ )
33
+
34
+ if output_file:
35
+ merger = PdfWriter()
36
+ pdfs_merger(merger, file_list)
37
+ merger.write(output_file)
38
+ merger.close()
39
+ messagebox.showinfo("Success", f"Merged PDF saved as:\n{output_file}")
40
+
41
+ def compress_pdfs():
42
+ if not file_list:
43
+ messagebox.showwarning("No Files", "Please add PDF files first.")
44
+ return
45
+
46
+ for pdf in file_list:
47
+ compress = PdfWriter(clone_from=pdf)
48
+ pdfs_compressor(compress)
49
+
50
+ output_file = filedialog.asksaveasfilename(
51
+ defaultextension=".pdf",
52
+ filetypes=[("PDF Files", "*.pdf")],
53
+ title="Save Compressed PDF As"
54
+ )
55
+
56
+ compress.write(output_file)
57
+
58
+
59
+ def delete_list_item(selected_item):
60
+ # Test codo log output to console
61
+ # for i in file_list:
62
+ # print(Path(i).name)
63
+ # print("")
64
+
65
+ # item_index = selected_item[0]
66
+ # del file_list[selected_item]
67
+ file_list.pop(selected_item)
68
+
69
+ # Test codo log output to console
70
+ # for r in file_list:
71
+ # print(Path(r).name)
72
+
73
+
74
+ def clear_list():
75
+ if file_list:
76
+ file_list.clear()
@@ -0,0 +1,110 @@
1
+
2
+ import tkinter as tk
3
+ from tkinter import messagebox
4
+ from pathlib import Path
5
+ from pdfine.pdfine_core import add_files, merge_pdfs, compress_pdfs, clear_list, delete_list_item
6
+
7
+ #asset relative path settings
8
+ # icon_dir = Path("../../asset/icon")
9
+
10
+ #get the absolute path of the module
11
+ base_dir = Path(__file__).resolve().parent
12
+
13
+ #Set the absolute path for the asset/icon resources
14
+ icon_dir = Path(Path(base_dir.parent).parent, "asset", "icon")
15
+
16
+ main = tk.Tk()
17
+ main.title("PDFine")
18
+ main.config(bg="#E4E2E2")
19
+ main.geometry("700x350") # size can be 500x415
20
+ main.update_idletasks()
21
+
22
+ geometryX = 500
23
+ geometryY = 100
24
+
25
+ # This line is used to make the main window non-resizable
26
+ # main.resizable(False, False)
27
+
28
+ # --- Custom Window Icon ---
29
+ # Use a .png or .ico file
30
+ pdfine_favicon = tk.PhotoImage(file=icon_dir / "pdfine-icon-81x81.png") # Replace with your file path
31
+ main.iconphoto(True, pdfine_favicon)
32
+
33
+ main.geometry("+%d+%d" % (geometryX, geometryY))
34
+
35
+
36
+ def file_adder():
37
+ file_list = add_files()
38
+ for file in file_list:
39
+ listbox.insert(tk.END, Path(file).name)
40
+
41
+
42
+ def item_deletion():
43
+ try:
44
+ selected_item = listbox.curselection()[0]
45
+ # Test codo log output to console
46
+ # print(selected_item)
47
+ # if selected_item >= 0:
48
+ listbox.delete(selected_item)
49
+ delete_list_item(selected_item)
50
+
51
+ except IndexError:
52
+ messagebox.showwarning("No File Selected", "Please select a file to delete")
53
+
54
+
55
+ def wipe_list():
56
+ clear_list()
57
+ listbox.delete(0, tk.END)
58
+
59
+
60
+ # Right click event handler function
61
+ def right_click(event):
62
+ context_menu.tk_popup(event.x_root, event.y_root)
63
+
64
+
65
+ menu = tk.Menu(main)
66
+ main.config(menu=menu)
67
+ menu_0 = tk.Menu(menu, tearoff=0)
68
+ menu_0.add_command(label="Add", command=file_adder)
69
+ menu_0.add_command(label="Clear", command=wipe_list)
70
+ menu_0.add_separator()
71
+ menu_0.add_command(label="Exit", command=main.quit)
72
+ menu.add_cascade(label="File", menu=menu_0)
73
+ menu_1 = tk.Menu(menu, tearoff=0)
74
+ menu_1.add_command(label="Merge", command=merge_pdfs)
75
+ menu_1.add_command(label="Compress", command=compress_pdfs)
76
+ menu_1.add_separator()
77
+ menu_1.add_command(label="Delete", command=item_deletion)
78
+ menu.add_cascade(label="Edit", menu=menu_1)
79
+
80
+
81
+ # Listbox to show selected files
82
+ listbox = tk.Listbox(master=main) # size width=70, height=20
83
+ listbox.config(bg="#EDECEC", fg="#000", bd=1, font=("Arial", 13, "bold"), selectmode="browse")
84
+ listbox.place(x=0, y=0, width=700, height=350)
85
+
86
+ # menu use for mouse right click action
87
+ context_menu = tk.Menu(main, tearoff=0, font=("Arial", 11))
88
+ context_menu.add_command(label="Delete", command=item_deletion)
89
+
90
+ # Binding right click action to the listbox area
91
+ listbox.bind("<Button-3>", right_click)
92
+
93
+
94
+
95
+ # Use to add buttons for merge and compress
96
+
97
+ # merge = tk.Button(master=main, text="Merge")
98
+ # merge.config(bg="#E4E2E2", fg="#000", bd=1, relief=tk.RAISED)
99
+ # merge.place(x=90, y=194, width=80, height=40)
100
+
101
+ # compress = tk.Button(master=main, text="Compress")
102
+ # compress.config(bg="#E4E2E2", fg="#000", bd=1, relief=tk.RAISED)
103
+ # compress.place(x=171, y=194, width=80, height=40)
104
+
105
+
106
+ def gui_app():
107
+ main.mainloop()
108
+
109
+ if __name__ == "__main__":
110
+ gui_app()
@@ -0,0 +1,5 @@
1
+
2
+ def pdfs_merger(merger,file_list):
3
+
4
+ for pdf in file_list:
5
+ merger.append(pdf)
@@ -0,0 +1 @@
1
+ #Define test