Commit 6b3b7e5
feat: PDF v3 - page filtering, image extraction, performance optimization (#283)
* feat: pdf read/write
* feat: pdf.js way
* feat: read_file add PDF support
* feat: write to PDF
* feat: extract image, from pdf
* feat: write pdf
* feat: adjust to tools
* feat: render pdf remark
* feat: modify using markdown
* feat: refactor, integrate with mcp tool
* fix: schema parsing for pdf write tool
* chore: remove experemental code
* feat: add page filter, make output more comprehensive, extend too descriptions
* feat: optimize performance for partial pages
* fix: image extraction, compression
* fix: remove png deps, adjust image optimization
* chore: adjust pdf parsing test
* Tests fix
* Update src/handlers/filesystem-handlers.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Update src/tools/pdf/extract-images.ts
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Update src/tools/mime-types.ts
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
* Update src/tools/pdf/markdown.ts
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
* Update src/handlers/filesystem-handlers.ts
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
* Update test/test-pdf-parsing.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* fix: remove duplicate PageRange type and add missing title variable
- Import PageRange type from canonical location ./lib/pdf2md.js
- Remove duplicate local PageRange type definition in markdown.ts
- Add missing title variable in filesystem-handlers.ts that was causing build failure
* Revert "Update src/tools/pdf/markdown.ts"
This reverts commit 134047f.
* fix: update md-to-pdf to ^5.2.5 to address CVE-2025-65108
* fix: pdf edit test
* feat: adjust pdf layout on insert/merge
* chore: up md-to-pdf version
* Update src/tools/pdf/manipulations.ts
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>
* Update test/test-pdf-creation.js
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* Few more PDF tweaks
---------
Co-authored-by: dasein <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: codeant-ai[bot] <151821869+codeant-ai[bot]@users.noreply.github.com>1 parent 36caa10 commit 6b3b7e5
File tree
21 files changed
+8288
-3229
lines changed- src
- handlers
- tools
- pdf
- lib
- test
- samples
- test_output
21 files changed
+8288
-3229
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| 85 | + | |
84 | 86 | | |
85 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
86 | 96 | | |
87 | 97 | | |
88 | 98 | | |
| |||
95 | 105 | | |
96 | 106 | | |
97 | 107 | | |
98 | | - | |
| 108 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
65 | | - | |
| 67 | + | |
66 | 68 | | |
67 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
68 | 101 | | |
69 | 102 | | |
70 | 103 | | |
71 | 104 | | |
72 | | - | |
73 | | - | |
74 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
75 | 108 | | |
76 | 109 | | |
77 | 110 | | |
| |||
87 | 120 | | |
88 | 121 | | |
89 | 122 | | |
90 | | - | |
| 123 | + | |
91 | 124 | | |
92 | 125 | | |
93 | 126 | | |
| |||
108 | 141 | | |
109 | 142 | | |
110 | 143 | | |
111 | | - | |
| 144 | + | |
112 | 145 | | |
113 | 146 | | |
114 | 147 | | |
115 | 148 | | |
| 149 | + | |
| 150 | + | |
116 | 151 | | |
117 | 152 | | |
118 | 153 | | |
119 | 154 | | |
120 | 155 | | |
121 | 156 | | |
122 | | - | |
| 157 | + | |
123 | 158 | | |
124 | | - | |
125 | | - | |
| 159 | + | |
| 160 | + | |
126 | 161 | | |
127 | 162 | | |
128 | | - | |
| 163 | + | |
129 | 164 | | |
130 | 165 | | |
131 | 166 | | |
132 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
133 | 182 | | |
134 | 183 | | |
135 | 184 | | |
| |||
145 | 194 | | |
146 | 195 | | |
147 | 196 | | |
148 | | - | |
| 197 | + | |
149 | 198 | | |
150 | 199 | | |
151 | 200 | | |
| |||
159 | 208 | | |
160 | 209 | | |
161 | 210 | | |
162 | | - | |
| 211 | + | |
163 | 212 | | |
164 | 213 | | |
165 | 214 | | |
| |||
172 | 221 | | |
173 | 222 | | |
174 | 223 | | |
175 | | - | |
| 224 | + | |
176 | 225 | | |
177 | 226 | | |
178 | | - | |
| 227 | + | |
179 | 228 | | |
180 | | - | |
181 | | - | |
| 229 | + | |
| 230 | + | |
182 | 231 | | |
183 | 232 | | |
184 | 233 | | |
| |||
249 | 298 | | |
250 | 299 | | |
251 | 300 | | |
252 | | - | |
253 | | - | |
| 301 | + | |
| 302 | + | |
254 | 303 | | |
255 | 304 | | |
256 | | - | |
| 305 | + | |
257 | 306 | | |
258 | 307 | | |
259 | 308 | | |
| |||
262 | 311 | | |
263 | 312 | | |
264 | 313 | | |
265 | | - | |
266 | 314 | | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
0 commit comments