pdfstructx 0.2.2__tar.gz → 0.2.4__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.
Files changed (38) hide show
  1. pdfstructx-0.2.4/LICENSE +190 -0
  2. {pdfstructx-0.2.2/src/pdfstructx.egg-info → pdfstructx-0.2.4}/PKG-INFO +50 -42
  3. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/README.md +47 -2
  4. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/pyproject.toml +3 -2
  5. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/__init__.py +2 -2
  6. {pdfstructx-0.2.2 → pdfstructx-0.2.4/src/pdfstructx.egg-info}/PKG-INFO +50 -42
  7. pdfstructx-0.2.2/LICENSE +0 -38
  8. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/MANIFEST.in +0 -0
  9. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/setup.cfg +0 -0
  10. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/extractors/__init__.py +0 -0
  11. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/extractors/images.py +0 -0
  12. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/extractors/text.py +0 -0
  13. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/layout/__init__.py +0 -0
  14. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/layout/analyzer.py +0 -0
  15. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/models/__init__.py +0 -0
  16. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/models/document.py +0 -0
  17. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/models/metadata.py +0 -0
  18. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/output/__init__.py +0 -0
  19. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/output/json_output.py +0 -0
  20. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/output/markdown.py +0 -0
  21. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/output/text_output.py +0 -0
  22. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/parser.py +0 -0
  23. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/structure/__init__.py +0 -0
  24. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/structure/headers_footers.py +0 -0
  25. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/structure/headings.py +0 -0
  26. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/structure/lists.py +0 -0
  27. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/structure/sections.py +0 -0
  28. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/tables/__init__.py +0 -0
  29. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/tables/detector.py +0 -0
  30. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/utils/__init__.py +0 -0
  31. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/utils/fonts.py +0 -0
  32. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/utils/geometry.py +0 -0
  33. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstruct/utils/language.py +0 -0
  34. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstructx.egg-info/SOURCES.txt +0 -0
  35. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstructx.egg-info/dependency_links.txt +0 -0
  36. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstructx.egg-info/requires.txt +0 -0
  37. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/src/pdfstructx.egg-info/top_level.txt +0 -0
  38. {pdfstructx-0.2.2 → pdfstructx-0.2.4}/tests/test_image_extraction.py +0 -0
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to the Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by the Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding any notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 Kyros Groupe
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
@@ -1,53 +1,16 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pdfstructx
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: Intelligent PDF parser with font-aware structure detection, table extraction, and multi-column support
5
5
  Author: Kyros Groupe
6
- License: pdfstruct - Personal Use License
7
-
8
- Copyright (c) 2026 Kyros Groupe. All rights reserved.
9
-
10
- Permission is hereby granted, free of charge, to any person obtaining a copy
11
- of this software and associated documentation files (the "Software"), to use,
12
- copy, modify, and distribute the Software for PERSONAL, EDUCATIONAL, and
13
- NON-COMMERCIAL purposes only, subject to the following conditions:
14
-
15
- 1. PERSONAL USE: You may use the Software for personal projects, learning,
16
- research, and non-commercial open-source projects.
17
-
18
- 2. COMMERCIAL USE PROHIBITED: You may NOT use the Software, in whole or in
19
- part, for any commercial purpose without obtaining a separate commercial
20
- license from Kyros Groupe. Commercial use includes, but is not limited to:
21
- - Incorporating the Software into a product or service sold for profit
22
- - Using the Software to provide paid services or SaaS offerings
23
- - Using the Software within a for-profit business for internal operations
24
- - Distributing the Software as part of a commercial product
25
-
26
- 3. ATTRIBUTION: All copies or substantial portions of the Software must
27
- include this license notice and the above copyright notice.
28
-
29
- 4. NO SUBLICENSING: You may not sublicense the Software under different terms.
30
-
31
- 5. MODIFICATIONS: You may modify the Software for personal use. Modified
32
- versions must retain this license and cannot be distributed under
33
- different terms.
34
-
35
- For commercial licensing inquiries, contact: licensing@kyros-groupe.com
36
-
37
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
38
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
39
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
40
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
41
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
42
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
43
- SOFTWARE.
44
-
6
+ License: Apache-2.0
45
7
  Project-URL: Homepage, https://github.com/Kyros-Groupe-Ltd/pdfstruct
46
8
  Project-URL: Documentation, https://github.com/Kyros-Groupe-Ltd/pdfstruct#readme
47
9
  Project-URL: Issues, https://github.com/Kyros-Groupe-Ltd/pdfstruct/issues
48
10
  Keywords: pdf,parser,document,extraction,tables,structure
49
11
  Classifier: Development Status :: 3 - Alpha
50
12
  Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: Apache Software License
51
14
  Classifier: Programming Language :: Python :: 3
52
15
  Classifier: Programming Language :: Python :: 3.10
53
16
  Classifier: Programming Language :: Python :: 3.11
@@ -67,8 +30,9 @@ Requires-Dist: ruff>=0.4.0; extra == "dev"
67
30
 
68
31
  # pdfstruct
69
32
 
70
- Intelligent PDF parser with font-aware structure detection, table extraction, and multi-column support.
33
+ **The PDF parser built for AI pipelines.** Structured sections, tables, images, and metadata — not just raw text.
71
34
 
35
+ [![PyPI](https://img.shields.io/pypi/v/pdfstructx.svg)](https://pypi.org/project/pdfstructx/)
72
36
  [![Python](https://img.shields.io/badge/python-≥3.10-blue.svg)](https://www.python.org/)
73
37
 
74
38
  ## Overview
@@ -213,6 +177,50 @@ Generate a thumbnail from extracted image bytes. Returns thumbnail bytes or None
213
177
  - `metadata.has_tables`, `metadata.has_images` — Content flags
214
178
  - `metadata.primary_font`, `metadata.primary_font_size` — Font info
215
179
 
180
+ ## Comparison
181
+
182
+ | Feature | pdfstructx | PyMuPDF | pdfplumber | Unstructured |
183
+ |---|---|---|---|---|
184
+ | **Text extraction** | ✅ | ✅ | ✅ | ✅ |
185
+ | **Section hierarchy** (H1–H6 tree) | ✅ | ❌ | ❌ | Partial |
186
+ | **Font-aware heading detection** | ✅ | ❌ | ❌ | ❌ |
187
+ | **Table extraction** | ✅ | ❌ | ✅ | ✅ |
188
+ | **Image extraction + metadata** | ✅ | ✅ | ❌ | ✅ |
189
+ | **Caption detection** | ✅ | ❌ | ❌ | ❌ |
190
+ | **Image deduplication** | ✅ | ❌ | ❌ | ❌ |
191
+ | **DPI estimation** | ✅ | ❌ | ❌ | ❌ |
192
+ | **Thumbnail generation** | ✅ | ❌ | ❌ | ❌ |
193
+ | **Multi-column layout** | ✅ | ❌ | ❌ | ✅ |
194
+ | **Header/footer removal** | ✅ | ❌ | ❌ | ✅ |
195
+ | **List detection** | ✅ | ❌ | ❌ | ✅ |
196
+ | **Language detection** | ✅ | ❌ | ❌ | ✅ |
197
+ | **Reading time / word count** | ✅ | ❌ | ❌ | ❌ |
198
+ | **Markdown export** | ✅ | ❌ | ❌ | ✅ |
199
+ | **JSON structured output** | ✅ | ❌ | ❌ | ✅ |
200
+ | **Pure Python (no Java/Docker)** | ✅ | ✅ | ✅ | ❌ |
201
+ | **License** | Apache 2.0 | AGPL | MIT | Apache 2.0 |
202
+
203
+ ## Real-World Benchmarks
204
+
205
+ Tested on actual documents — not toy examples:
206
+
207
+ | Document | Pages | Words | Sections | Tables | Images (unique) | Time |
208
+ |---|---|---|---|---|---|---|
209
+ | 3-page CV | 3 | 863 | 1 | 3 | 0 | 164 ms |
210
+ | Bank statement (French) | 5 | 1,880 | 23 | 2 | 2 (1) | 379 ms |
211
+ | 130-page gov't RFP | 130 | 41,420 | 62 | 73 | 269 (8 unique) | 10.2 s |
212
+ | 224-page procurement doc | 224 | 53,979 | 107 | 118 | 408 (58 unique) | 23.6 s |
213
+
214
+ **Head-to-head on the 130-page RFP:**
215
+
216
+ | Library | Time | Words | Tables | Sections | Images | Dedup |
217
+ |---|---|---|---|---|---|---|
218
+ | **PyMuPDF** | 277 ms | 43,455 | ❌ N/A | ❌ N/A | 270 | ❌ No |
219
+ | **pdfplumber** | 16.5 s | 43,420 | 142 | ❌ N/A | ❌ N/A | ❌ No |
220
+ | **pdfstructx** | 13.1 s | 41,420 | 73 | 62 | 269 (8 unique) | ✅ 261 dupes filtered |
221
+
222
+ PyMuPDF is faster (C-based) but gives you flat text — no sections, no structure, no deduplication. pdfplumber finds tables but no hierarchy. pdfstructx gives you the complete picture.
223
+
216
224
  ## Architecture
217
225
 
218
226
  ```
@@ -251,4 +259,4 @@ pdfstruct/
251
259
 
252
260
  ## License
253
261
 
254
- Personal Use License by Kyros Groupe. See [LICENSE](LICENSE) for details.
262
+ Apache License 2.0. See [LICENSE](LICENSE) for details.
@@ -1,7 +1,8 @@
1
1
  # pdfstruct
2
2
 
3
- Intelligent PDF parser with font-aware structure detection, table extraction, and multi-column support.
3
+ **The PDF parser built for AI pipelines.** Structured sections, tables, images, and metadata — not just raw text.
4
4
 
5
+ [![PyPI](https://img.shields.io/pypi/v/pdfstructx.svg)](https://pypi.org/project/pdfstructx/)
5
6
  [![Python](https://img.shields.io/badge/python-≥3.10-blue.svg)](https://www.python.org/)
6
7
 
7
8
  ## Overview
@@ -146,6 +147,50 @@ Generate a thumbnail from extracted image bytes. Returns thumbnail bytes or None
146
147
  - `metadata.has_tables`, `metadata.has_images` — Content flags
147
148
  - `metadata.primary_font`, `metadata.primary_font_size` — Font info
148
149
 
150
+ ## Comparison
151
+
152
+ | Feature | pdfstructx | PyMuPDF | pdfplumber | Unstructured |
153
+ |---|---|---|---|---|
154
+ | **Text extraction** | ✅ | ✅ | ✅ | ✅ |
155
+ | **Section hierarchy** (H1–H6 tree) | ✅ | ❌ | ❌ | Partial |
156
+ | **Font-aware heading detection** | ✅ | ❌ | ❌ | ❌ |
157
+ | **Table extraction** | ✅ | ❌ | ✅ | ✅ |
158
+ | **Image extraction + metadata** | ✅ | ✅ | ❌ | ✅ |
159
+ | **Caption detection** | ✅ | ❌ | ❌ | ❌ |
160
+ | **Image deduplication** | ✅ | ❌ | ❌ | ❌ |
161
+ | **DPI estimation** | ✅ | ❌ | ❌ | ❌ |
162
+ | **Thumbnail generation** | ✅ | ❌ | ❌ | ❌ |
163
+ | **Multi-column layout** | ✅ | ❌ | ❌ | ✅ |
164
+ | **Header/footer removal** | ✅ | ❌ | ❌ | ✅ |
165
+ | **List detection** | ✅ | ❌ | ❌ | ✅ |
166
+ | **Language detection** | ✅ | ❌ | ❌ | ✅ |
167
+ | **Reading time / word count** | ✅ | ❌ | ❌ | ❌ |
168
+ | **Markdown export** | ✅ | ❌ | ❌ | ✅ |
169
+ | **JSON structured output** | ✅ | ❌ | ❌ | ✅ |
170
+ | **Pure Python (no Java/Docker)** | ✅ | ✅ | ✅ | ❌ |
171
+ | **License** | Apache 2.0 | AGPL | MIT | Apache 2.0 |
172
+
173
+ ## Real-World Benchmarks
174
+
175
+ Tested on actual documents — not toy examples:
176
+
177
+ | Document | Pages | Words | Sections | Tables | Images (unique) | Time |
178
+ |---|---|---|---|---|---|---|
179
+ | 3-page CV | 3 | 863 | 1 | 3 | 0 | 164 ms |
180
+ | Bank statement (French) | 5 | 1,880 | 23 | 2 | 2 (1) | 379 ms |
181
+ | 130-page gov't RFP | 130 | 41,420 | 62 | 73 | 269 (8 unique) | 10.2 s |
182
+ | 224-page procurement doc | 224 | 53,979 | 107 | 118 | 408 (58 unique) | 23.6 s |
183
+
184
+ **Head-to-head on the 130-page RFP:**
185
+
186
+ | Library | Time | Words | Tables | Sections | Images | Dedup |
187
+ |---|---|---|---|---|---|---|
188
+ | **PyMuPDF** | 277 ms | 43,455 | ❌ N/A | ❌ N/A | 270 | ❌ No |
189
+ | **pdfplumber** | 16.5 s | 43,420 | 142 | ❌ N/A | ❌ N/A | ❌ No |
190
+ | **pdfstructx** | 13.1 s | 41,420 | 73 | 62 | 269 (8 unique) | ✅ 261 dupes filtered |
191
+
192
+ PyMuPDF is faster (C-based) but gives you flat text — no sections, no structure, no deduplication. pdfplumber finds tables but no hierarchy. pdfstructx gives you the complete picture.
193
+
149
194
  ## Architecture
150
195
 
151
196
  ```
@@ -184,4 +229,4 @@ pdfstruct/
184
229
 
185
230
  ## License
186
231
 
187
- Personal Use License by Kyros Groupe. See [LICENSE](LICENSE) for details.
232
+ Apache License 2.0. See [LICENSE](LICENSE) for details.
@@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pdfstructx"
7
- version = "0.2.2"
7
+ version = "0.2.4"
8
8
  description = "Intelligent PDF parser with font-aware structure detection, table extraction, and multi-column support"
9
9
  readme = "README.md"
10
- license = {file = "LICENSE"}
10
+ license = {text = "Apache-2.0"}
11
11
  requires-python = ">=3.10"
12
12
  authors = [
13
13
  {name = "Kyros Groupe"},
@@ -16,6 +16,7 @@ keywords = ["pdf", "parser", "document", "extraction", "tables", "structure"]
16
16
  classifiers = [
17
17
  "Development Status :: 3 - Alpha",
18
18
  "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: Apache Software License",
19
20
  "Programming Language :: Python :: 3",
20
21
  "Programming Language :: Python :: 3.10",
21
22
  "Programming Language :: Python :: 3.11",
@@ -17,11 +17,11 @@ Export formats:
17
17
  >>> pdfstruct.to_text(doc)
18
18
  >>> pdfstruct.to_dict(doc)
19
19
 
20
- License: Personal Use Only — see LICENSE file.
20
+ License: Apache 2.0 — see LICENSE file.
21
21
  Copyright (c) 2026 Kyros Groupe.
22
22
  """
23
23
 
24
- __version__ = "0.2.2"
24
+ __version__ = "0.2.4"
25
25
 
26
26
  from pdfstruct.parser import parse, PDFParser
27
27
  from pdfstruct.models.document import (
@@ -1,53 +1,16 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pdfstructx
3
- Version: 0.2.2
3
+ Version: 0.2.4
4
4
  Summary: Intelligent PDF parser with font-aware structure detection, table extraction, and multi-column support
5
5
  Author: Kyros Groupe
6
- License: pdfstruct - Personal Use License
7
-
8
- Copyright (c) 2026 Kyros Groupe. All rights reserved.
9
-
10
- Permission is hereby granted, free of charge, to any person obtaining a copy
11
- of this software and associated documentation files (the "Software"), to use,
12
- copy, modify, and distribute the Software for PERSONAL, EDUCATIONAL, and
13
- NON-COMMERCIAL purposes only, subject to the following conditions:
14
-
15
- 1. PERSONAL USE: You may use the Software for personal projects, learning,
16
- research, and non-commercial open-source projects.
17
-
18
- 2. COMMERCIAL USE PROHIBITED: You may NOT use the Software, in whole or in
19
- part, for any commercial purpose without obtaining a separate commercial
20
- license from Kyros Groupe. Commercial use includes, but is not limited to:
21
- - Incorporating the Software into a product or service sold for profit
22
- - Using the Software to provide paid services or SaaS offerings
23
- - Using the Software within a for-profit business for internal operations
24
- - Distributing the Software as part of a commercial product
25
-
26
- 3. ATTRIBUTION: All copies or substantial portions of the Software must
27
- include this license notice and the above copyright notice.
28
-
29
- 4. NO SUBLICENSING: You may not sublicense the Software under different terms.
30
-
31
- 5. MODIFICATIONS: You may modify the Software for personal use. Modified
32
- versions must retain this license and cannot be distributed under
33
- different terms.
34
-
35
- For commercial licensing inquiries, contact: licensing@kyros-groupe.com
36
-
37
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
38
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
39
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
40
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
41
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
42
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
43
- SOFTWARE.
44
-
6
+ License: Apache-2.0
45
7
  Project-URL: Homepage, https://github.com/Kyros-Groupe-Ltd/pdfstruct
46
8
  Project-URL: Documentation, https://github.com/Kyros-Groupe-Ltd/pdfstruct#readme
47
9
  Project-URL: Issues, https://github.com/Kyros-Groupe-Ltd/pdfstruct/issues
48
10
  Keywords: pdf,parser,document,extraction,tables,structure
49
11
  Classifier: Development Status :: 3 - Alpha
50
12
  Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: Apache Software License
51
14
  Classifier: Programming Language :: Python :: 3
52
15
  Classifier: Programming Language :: Python :: 3.10
53
16
  Classifier: Programming Language :: Python :: 3.11
@@ -67,8 +30,9 @@ Requires-Dist: ruff>=0.4.0; extra == "dev"
67
30
 
68
31
  # pdfstruct
69
32
 
70
- Intelligent PDF parser with font-aware structure detection, table extraction, and multi-column support.
33
+ **The PDF parser built for AI pipelines.** Structured sections, tables, images, and metadata — not just raw text.
71
34
 
35
+ [![PyPI](https://img.shields.io/pypi/v/pdfstructx.svg)](https://pypi.org/project/pdfstructx/)
72
36
  [![Python](https://img.shields.io/badge/python-≥3.10-blue.svg)](https://www.python.org/)
73
37
 
74
38
  ## Overview
@@ -213,6 +177,50 @@ Generate a thumbnail from extracted image bytes. Returns thumbnail bytes or None
213
177
  - `metadata.has_tables`, `metadata.has_images` — Content flags
214
178
  - `metadata.primary_font`, `metadata.primary_font_size` — Font info
215
179
 
180
+ ## Comparison
181
+
182
+ | Feature | pdfstructx | PyMuPDF | pdfplumber | Unstructured |
183
+ |---|---|---|---|---|
184
+ | **Text extraction** | ✅ | ✅ | ✅ | ✅ |
185
+ | **Section hierarchy** (H1–H6 tree) | ✅ | ❌ | ❌ | Partial |
186
+ | **Font-aware heading detection** | ✅ | ❌ | ❌ | ❌ |
187
+ | **Table extraction** | ✅ | ❌ | ✅ | ✅ |
188
+ | **Image extraction + metadata** | ✅ | ✅ | ❌ | ✅ |
189
+ | **Caption detection** | ✅ | ❌ | ❌ | ❌ |
190
+ | **Image deduplication** | ✅ | ❌ | ❌ | ❌ |
191
+ | **DPI estimation** | ✅ | ❌ | ❌ | ❌ |
192
+ | **Thumbnail generation** | ✅ | ❌ | ❌ | ❌ |
193
+ | **Multi-column layout** | ✅ | ❌ | ❌ | ✅ |
194
+ | **Header/footer removal** | ✅ | ❌ | ❌ | ✅ |
195
+ | **List detection** | ✅ | ❌ | ❌ | ✅ |
196
+ | **Language detection** | ✅ | ❌ | ❌ | ✅ |
197
+ | **Reading time / word count** | ✅ | ❌ | ❌ | ❌ |
198
+ | **Markdown export** | ✅ | ❌ | ❌ | ✅ |
199
+ | **JSON structured output** | ✅ | ❌ | ❌ | ✅ |
200
+ | **Pure Python (no Java/Docker)** | ✅ | ✅ | ✅ | ❌ |
201
+ | **License** | Apache 2.0 | AGPL | MIT | Apache 2.0 |
202
+
203
+ ## Real-World Benchmarks
204
+
205
+ Tested on actual documents — not toy examples:
206
+
207
+ | Document | Pages | Words | Sections | Tables | Images (unique) | Time |
208
+ |---|---|---|---|---|---|---|
209
+ | 3-page CV | 3 | 863 | 1 | 3 | 0 | 164 ms |
210
+ | Bank statement (French) | 5 | 1,880 | 23 | 2 | 2 (1) | 379 ms |
211
+ | 130-page gov't RFP | 130 | 41,420 | 62 | 73 | 269 (8 unique) | 10.2 s |
212
+ | 224-page procurement doc | 224 | 53,979 | 107 | 118 | 408 (58 unique) | 23.6 s |
213
+
214
+ **Head-to-head on the 130-page RFP:**
215
+
216
+ | Library | Time | Words | Tables | Sections | Images | Dedup |
217
+ |---|---|---|---|---|---|---|
218
+ | **PyMuPDF** | 277 ms | 43,455 | ❌ N/A | ❌ N/A | 270 | ❌ No |
219
+ | **pdfplumber** | 16.5 s | 43,420 | 142 | ❌ N/A | ❌ N/A | ❌ No |
220
+ | **pdfstructx** | 13.1 s | 41,420 | 73 | 62 | 269 (8 unique) | ✅ 261 dupes filtered |
221
+
222
+ PyMuPDF is faster (C-based) but gives you flat text — no sections, no structure, no deduplication. pdfplumber finds tables but no hierarchy. pdfstructx gives you the complete picture.
223
+
216
224
  ## Architecture
217
225
 
218
226
  ```
@@ -251,4 +259,4 @@ pdfstruct/
251
259
 
252
260
  ## License
253
261
 
254
- Personal Use License by Kyros Groupe. See [LICENSE](LICENSE) for details.
262
+ Apache License 2.0. See [LICENSE](LICENSE) for details.
pdfstructx-0.2.2/LICENSE DELETED
@@ -1,38 +0,0 @@
1
- pdfstruct - Personal Use License
2
-
3
- Copyright (c) 2026 Kyros Groupe. All rights reserved.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to use,
7
- copy, modify, and distribute the Software for PERSONAL, EDUCATIONAL, and
8
- NON-COMMERCIAL purposes only, subject to the following conditions:
9
-
10
- 1. PERSONAL USE: You may use the Software for personal projects, learning,
11
- research, and non-commercial open-source projects.
12
-
13
- 2. COMMERCIAL USE PROHIBITED: You may NOT use the Software, in whole or in
14
- part, for any commercial purpose without obtaining a separate commercial
15
- license from Kyros Groupe. Commercial use includes, but is not limited to:
16
- - Incorporating the Software into a product or service sold for profit
17
- - Using the Software to provide paid services or SaaS offerings
18
- - Using the Software within a for-profit business for internal operations
19
- - Distributing the Software as part of a commercial product
20
-
21
- 3. ATTRIBUTION: All copies or substantial portions of the Software must
22
- include this license notice and the above copyright notice.
23
-
24
- 4. NO SUBLICENSING: You may not sublicense the Software under different terms.
25
-
26
- 5. MODIFICATIONS: You may modify the Software for personal use. Modified
27
- versions must retain this license and cannot be distributed under
28
- different terms.
29
-
30
- For commercial licensing inquiries, contact: licensing@kyros-groupe.com
31
-
32
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
35
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
36
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
37
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
38
- SOFTWARE.
File without changes
File without changes