PyMuPDF 1.26.6__cp310-abi3-win_amd64.whl

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 (112) hide show
  1. fitz/__init__.py +13 -0
  2. fitz/table.py +2 -0
  3. fitz/utils.py +2 -0
  4. pymupdf/__init__.py +25899 -0
  5. pymupdf/__main__.py +1140 -0
  6. pymupdf/_apply_pages.py +253 -0
  7. pymupdf/_build.py +8 -0
  8. pymupdf/_extra.pyd +0 -0
  9. pymupdf/_mupdf.pyd +0 -0
  10. pymupdf/_wxcolors.py +562 -0
  11. pymupdf/extra.py +220 -0
  12. pymupdf/mupdf-devel/include/mupdf/classes.h +19999 -0
  13. pymupdf/mupdf-devel/include/mupdf/classes2.h +12244 -0
  14. pymupdf/mupdf-devel/include/mupdf/exceptions.h +118 -0
  15. pymupdf/mupdf-devel/include/mupdf/extra.h +189 -0
  16. pymupdf/mupdf-devel/include/mupdf/fitz/archive.h +444 -0
  17. pymupdf/mupdf-devel/include/mupdf/fitz/band-writer.h +117 -0
  18. pymupdf/mupdf-devel/include/mupdf/fitz/barcode.h +138 -0
  19. pymupdf/mupdf-devel/include/mupdf/fitz/bidi.h +90 -0
  20. pymupdf/mupdf-devel/include/mupdf/fitz/bitmap.h +188 -0
  21. pymupdf/mupdf-devel/include/mupdf/fitz/buffer.h +250 -0
  22. pymupdf/mupdf-devel/include/mupdf/fitz/color.h +433 -0
  23. pymupdf/mupdf-devel/include/mupdf/fitz/compress.h +132 -0
  24. pymupdf/mupdf-devel/include/mupdf/fitz/compressed-buffer.h +194 -0
  25. pymupdf/mupdf-devel/include/mupdf/fitz/config.h +302 -0
  26. pymupdf/mupdf-devel/include/mupdf/fitz/context.h +1064 -0
  27. pymupdf/mupdf-devel/include/mupdf/fitz/crypt.h +270 -0
  28. pymupdf/mupdf-devel/include/mupdf/fitz/deskew.h +46 -0
  29. pymupdf/mupdf-devel/include/mupdf/fitz/device.h +652 -0
  30. pymupdf/mupdf-devel/include/mupdf/fitz/display-list.h +142 -0
  31. pymupdf/mupdf-devel/include/mupdf/fitz/document.h +1103 -0
  32. pymupdf/mupdf-devel/include/mupdf/fitz/export.h +52 -0
  33. pymupdf/mupdf-devel/include/mupdf/fitz/filter.h +269 -0
  34. pymupdf/mupdf-devel/include/mupdf/fitz/font.h +858 -0
  35. pymupdf/mupdf-devel/include/mupdf/fitz/geometry.h +885 -0
  36. pymupdf/mupdf-devel/include/mupdf/fitz/getopt.h +134 -0
  37. pymupdf/mupdf-devel/include/mupdf/fitz/glyph-cache.h +96 -0
  38. pymupdf/mupdf-devel/include/mupdf/fitz/glyph.h +81 -0
  39. pymupdf/mupdf-devel/include/mupdf/fitz/hash.h +126 -0
  40. pymupdf/mupdf-devel/include/mupdf/fitz/heap-imp.h +190 -0
  41. pymupdf/mupdf-devel/include/mupdf/fitz/heap.h +143 -0
  42. pymupdf/mupdf-devel/include/mupdf/fitz/image.h +451 -0
  43. pymupdf/mupdf-devel/include/mupdf/fitz/json.h +98 -0
  44. pymupdf/mupdf-devel/include/mupdf/fitz/link.h +130 -0
  45. pymupdf/mupdf-devel/include/mupdf/fitz/log.h +61 -0
  46. pymupdf/mupdf-devel/include/mupdf/fitz/outline.h +254 -0
  47. pymupdf/mupdf-devel/include/mupdf/fitz/output-svg.h +64 -0
  48. pymupdf/mupdf-devel/include/mupdf/fitz/output.h +448 -0
  49. pymupdf/mupdf-devel/include/mupdf/fitz/path.h +477 -0
  50. pymupdf/mupdf-devel/include/mupdf/fitz/pixmap.h +516 -0
  51. pymupdf/mupdf-devel/include/mupdf/fitz/pool.h +102 -0
  52. pymupdf/mupdf-devel/include/mupdf/fitz/separation.h +138 -0
  53. pymupdf/mupdf-devel/include/mupdf/fitz/shade.h +233 -0
  54. pymupdf/mupdf-devel/include/mupdf/fitz/store.h +465 -0
  55. pymupdf/mupdf-devel/include/mupdf/fitz/story-writer.h +209 -0
  56. pymupdf/mupdf-devel/include/mupdf/fitz/story.h +232 -0
  57. pymupdf/mupdf-devel/include/mupdf/fitz/stream.h +646 -0
  58. pymupdf/mupdf-devel/include/mupdf/fitz/string-util.h +335 -0
  59. pymupdf/mupdf-devel/include/mupdf/fitz/structured-text.h +924 -0
  60. pymupdf/mupdf-devel/include/mupdf/fitz/system.h +495 -0
  61. pymupdf/mupdf-devel/include/mupdf/fitz/text.h +210 -0
  62. pymupdf/mupdf-devel/include/mupdf/fitz/track-usage.h +57 -0
  63. pymupdf/mupdf-devel/include/mupdf/fitz/transition.h +76 -0
  64. pymupdf/mupdf-devel/include/mupdf/fitz/tree.h +62 -0
  65. pymupdf/mupdf-devel/include/mupdf/fitz/types.h +41 -0
  66. pymupdf/mupdf-devel/include/mupdf/fitz/util.h +159 -0
  67. pymupdf/mupdf-devel/include/mupdf/fitz/version.h +31 -0
  68. pymupdf/mupdf-devel/include/mupdf/fitz/write-pixmap.h +507 -0
  69. pymupdf/mupdf-devel/include/mupdf/fitz/writer.h +269 -0
  70. pymupdf/mupdf-devel/include/mupdf/fitz/xml.h +435 -0
  71. pymupdf/mupdf-devel/include/mupdf/fitz.h +101 -0
  72. pymupdf/mupdf-devel/include/mupdf/functions.h +13819 -0
  73. pymupdf/mupdf-devel/include/mupdf/helpers/mu-office-lib.h +666 -0
  74. pymupdf/mupdf-devel/include/mupdf/helpers/mu-threads.h +280 -0
  75. pymupdf/mupdf-devel/include/mupdf/helpers/pkcs7-openssl.h +48 -0
  76. pymupdf/mupdf-devel/include/mupdf/html.h +53 -0
  77. pymupdf/mupdf-devel/include/mupdf/internal.h +29 -0
  78. pymupdf/mupdf-devel/include/mupdf/memento.h +425 -0
  79. pymupdf/mupdf-devel/include/mupdf/pdf/annot.h +1015 -0
  80. pymupdf/mupdf-devel/include/mupdf/pdf/clean.h +68 -0
  81. pymupdf/mupdf-devel/include/mupdf/pdf/cmap.h +145 -0
  82. pymupdf/mupdf-devel/include/mupdf/pdf/crypt.h +108 -0
  83. pymupdf/mupdf-devel/include/mupdf/pdf/document.h +902 -0
  84. pymupdf/mupdf-devel/include/mupdf/pdf/event.h +167 -0
  85. pymupdf/mupdf-devel/include/mupdf/pdf/font.h +168 -0
  86. pymupdf/mupdf-devel/include/mupdf/pdf/form.h +381 -0
  87. pymupdf/mupdf-devel/include/mupdf/pdf/image-rewriter.h +78 -0
  88. pymupdf/mupdf-devel/include/mupdf/pdf/interpret.h +518 -0
  89. pymupdf/mupdf-devel/include/mupdf/pdf/javascript.h +43 -0
  90. pymupdf/mupdf-devel/include/mupdf/pdf/name-table.h +621 -0
  91. pymupdf/mupdf-devel/include/mupdf/pdf/object.h +445 -0
  92. pymupdf/mupdf-devel/include/mupdf/pdf/page.h +327 -0
  93. pymupdf/mupdf-devel/include/mupdf/pdf/parse.h +61 -0
  94. pymupdf/mupdf-devel/include/mupdf/pdf/recolor.h +49 -0
  95. pymupdf/mupdf-devel/include/mupdf/pdf/resource.h +144 -0
  96. pymupdf/mupdf-devel/include/mupdf/pdf/xref.h +300 -0
  97. pymupdf/mupdf-devel/include/mupdf/pdf/zugferd.h +49 -0
  98. pymupdf/mupdf-devel/include/mupdf/pdf.h +59 -0
  99. pymupdf/mupdf-devel/include/mupdf/ucdn.h +464 -0
  100. pymupdf/mupdf-devel/lib/libmuthreads.lib +0 -0
  101. pymupdf/mupdf-devel/lib/mupdfcpp64.lib +0 -0
  102. pymupdf/mupdf.py +63667 -0
  103. pymupdf/mupdfcpp64.dll +0 -0
  104. pymupdf/pymupdf.py +2 -0
  105. pymupdf/table.py +2697 -0
  106. pymupdf/utils.py +1169 -0
  107. pymupdf-1.26.6.dist-info/COPYING +1 -0
  108. pymupdf-1.26.6.dist-info/METADATA +83 -0
  109. pymupdf-1.26.6.dist-info/README.md +60 -0
  110. pymupdf-1.26.6.dist-info/RECORD +112 -0
  111. pymupdf-1.26.6.dist-info/WHEEL +4 -0
  112. pymupdf-1.26.6.dist-info/entry_points.txt +3 -0
@@ -0,0 +1,52 @@
1
+ // Copyright (C) 2004-2021 Artifex Software, Inc.
2
+ //
3
+ // This file is part of MuPDF.
4
+ //
5
+ // MuPDF is free software: you can redistribute it and/or modify it under the
6
+ // terms of the GNU Affero General Public License as published by the Free
7
+ // Software Foundation, either version 3 of the License, or (at your option)
8
+ // any later version.
9
+ //
10
+ // MuPDF is distributed in the hope that it will be useful, but WITHOUT ANY
11
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
+ // FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
13
+ // details.
14
+ //
15
+ // You should have received a copy of the GNU Affero General Public License
16
+ // along with MuPDF. If not, see <https://www.gnu.org/licenses/agpl-3.0.en.html>
17
+ //
18
+ // Alternative licensing terms are available from the licensor.
19
+ // For commercial licensing, see <https://www.artifex.com/> or contact
20
+ // Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco,
21
+ // CA 94129, USA, for further information.
22
+
23
+ #ifndef MUPDF_FITZ_EXPORT_H
24
+ #define MUPDF_FITZ_EXPORT_H
25
+
26
+ /*
27
+ * Support for building/using MuPDF DLL on Windows.
28
+ *
29
+ * When compiling code that uses MuPDF DLL, FZ_DLL_CLIENT should be defined.
30
+ *
31
+ * When compiling MuPDF DLL itself, FZ_DLL should be defined.
32
+ */
33
+
34
+ #if defined(_WIN32) || defined(_WIN64)
35
+ #if defined(FZ_DLL)
36
+ /* Building DLL. */
37
+ #define FZ_FUNCTION __declspec(dllexport)
38
+ #define FZ_DATA __declspec(dllexport)
39
+ #elif defined(FZ_DLL_CLIENT)
40
+ /* Building DLL client code. */
41
+ #define FZ_FUNCTION __declspec(dllexport)
42
+ #define FZ_DATA __declspec(dllimport)
43
+ #else
44
+ #define FZ_FUNCTION
45
+ #define FZ_DATA
46
+ #endif
47
+ #else
48
+ #define FZ_FUNCTION
49
+ #define FZ_DATA
50
+ #endif
51
+
52
+ #endif
@@ -0,0 +1,269 @@
1
+ // Copyright (C) 2004-2025 Artifex Software, Inc.
2
+ //
3
+ // This file is part of MuPDF.
4
+ //
5
+ // MuPDF is free software: you can redistribute it and/or modify it under the
6
+ // terms of the GNU Affero General Public License as published by the Free
7
+ // Software Foundation, either version 3 of the License, or (at your option)
8
+ // any later version.
9
+ //
10
+ // MuPDF is distributed in the hope that it will be useful, but WITHOUT ANY
11
+ // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12
+ // FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
13
+ // details.
14
+ //
15
+ // You should have received a copy of the GNU Affero General Public License
16
+ // along with MuPDF. If not, see <https://www.gnu.org/licenses/agpl-3.0.en.html>
17
+ //
18
+ // Alternative licensing terms are available from the licensor.
19
+ // For commercial licensing, see <https://www.artifex.com/> or contact
20
+ // Artifex Software, Inc., 39 Mesa Street, Suite 108A, San Francisco,
21
+ // CA 94129, USA, for further information.
22
+
23
+ #ifndef MUPDF_FITZ_FILTER_H
24
+ #define MUPDF_FITZ_FILTER_H
25
+
26
+ #include "mupdf/fitz/system.h"
27
+ #include "mupdf/fitz/context.h"
28
+ #include "mupdf/fitz/buffer.h"
29
+ #include "mupdf/fitz/store.h"
30
+ #include "mupdf/fitz/stream.h"
31
+
32
+ typedef struct fz_jbig2_globals fz_jbig2_globals;
33
+
34
+ typedef struct
35
+ {
36
+ int64_t offset;
37
+ uint64_t length;
38
+ } fz_range;
39
+
40
+ /**
41
+ The null filter reads a specified amount of data from the
42
+ substream.
43
+ */
44
+ fz_stream *fz_open_null_filter(fz_context *ctx, fz_stream *chain, uint64_t len, int64_t offset);
45
+
46
+ /**
47
+ The range filter copies data from specified ranges of the
48
+ chained stream.
49
+ */
50
+ fz_stream *fz_open_range_filter(fz_context *ctx, fz_stream *chain, fz_range *ranges, int nranges);
51
+
52
+ /**
53
+ The endstream filter reads a PDF substream, and starts to look
54
+ for an 'endstream' token after the specified length.
55
+ */
56
+ fz_stream *fz_open_endstream_filter(fz_context *ctx, fz_stream *chain, uint64_t len, int64_t offset);
57
+
58
+ /**
59
+ Concat filter concatenates several streams into one.
60
+ */
61
+ fz_stream *fz_open_concat(fz_context *ctx, int max, int pad);
62
+
63
+ /**
64
+ Add a chained stream to the end of the concatenate filter.
65
+
66
+ Ownership of chain is passed in.
67
+ */
68
+ void fz_concat_push_drop(fz_context *ctx, fz_stream *concat, fz_stream *chain);
69
+
70
+ /**
71
+ arc4 filter performs RC4 decoding of data read from the chained
72
+ filter using the supplied key.
73
+ */
74
+ fz_stream *fz_open_arc4(fz_context *ctx, fz_stream *chain, unsigned char *key, unsigned keylen);
75
+
76
+ /**
77
+ aesd filter performs AES decoding of data read from the chained
78
+ filter using the supplied key.
79
+ */
80
+ fz_stream *fz_open_aesd(fz_context *ctx, fz_stream *chain, unsigned char *key, unsigned keylen);
81
+
82
+ /**
83
+ a85d filter performs ASCII 85 Decoding of data read
84
+ from the chained filter.
85
+ */
86
+ fz_stream *fz_open_a85d(fz_context *ctx, fz_stream *chain);
87
+
88
+ /**
89
+ ahxd filter performs ASCII Hex decoding of data read
90
+ from the chained filter.
91
+ */
92
+ fz_stream *fz_open_ahxd(fz_context *ctx, fz_stream *chain);
93
+
94
+ /**
95
+ rld filter performs Run Length Decoding of data read
96
+ from the chained filter.
97
+ */
98
+ fz_stream *fz_open_rld(fz_context *ctx, fz_stream *chain);
99
+
100
+ /**
101
+ dctd filter performs DCT (JPEG) decoding of data read
102
+ from the chained filter.
103
+
104
+ color_transform implements the PDF color_transform option
105
+ use -1 for default behavior
106
+ use 0 to disable YUV-RGB / YCCK-CMYK transforms
107
+ use 1 to enable YUV-RGB / YCCK-CMYK transforms
108
+
109
+ invert_cmyk implements the necessary inversion for Photoshop CMYK images
110
+ use 0 if embedded in PDF
111
+ use 1 if not embedded in PDF
112
+
113
+ For subsampling on decode, set l2factor to the log2 of the
114
+ reduction required (therefore 0 = full size decode).
115
+
116
+ jpegtables is an optional stream from which the JPEG tables
117
+ can be read. Use NULL if not required.
118
+ */
119
+ fz_stream *fz_open_dctd(fz_context *ctx, fz_stream *chain, int color_transform, int invert_cmyk, int l2factor, fz_stream *jpegtables);
120
+
121
+ /**
122
+ faxd filter performs FAX decoding of data read from
123
+ the chained filter.
124
+
125
+ k: see fax specification (fax default is 0).
126
+
127
+ end_of_line: whether we expect end of line markers (fax default
128
+ is 0).
129
+
130
+ encoded_byte_align: whether we align to bytes after each line
131
+ (fax default is 0).
132
+
133
+ columns: how many columns in the image (fax default is 1728).
134
+
135
+ rows: 0 for unspecified or the number of rows of data to expect.
136
+
137
+ end_of_block: whether we expect end of block markers (fax
138
+ default is 1).
139
+
140
+ black_is_1: determines the polarity of the image (fax default is
141
+ 0).
142
+ */
143
+ fz_stream *fz_open_faxd(fz_context *ctx, fz_stream *chain,
144
+ int k, int end_of_line, int encoded_byte_align,
145
+ int columns, int rows, int end_of_block, int black_is_1);
146
+
147
+ /**
148
+ flated filter performs LZ77 decoding (inflating) of data read
149
+ from the chained filter.
150
+
151
+ window_bits: How large a decompression window to use. Typically
152
+ 15. A negative number, -n, means to use n bits, but to expect
153
+ raw data with no header.
154
+ */
155
+ fz_stream *fz_open_flated(fz_context *ctx, fz_stream *chain, int window_bits);
156
+
157
+ /**
158
+ libarchived filter performs generic compressed decoding of data
159
+ in any format understood by libarchive from the chained filter.
160
+
161
+ This will throw an exception if libarchive is not built in, or
162
+ if the compression format is not recognised.
163
+ */
164
+ fz_stream *fz_open_libarchived(fz_context *ctx, fz_stream *chain);
165
+
166
+ /**
167
+ brotlid filter performs Brotli decoding of data read
168
+ from the chained filter.
169
+ */
170
+ fz_stream *fz_open_brotlid(fz_context *ctx, fz_stream *chain);
171
+
172
+ /**
173
+ lzwd filter performs LZW decoding of data read from the chained
174
+ filter.
175
+
176
+ early_change: (Default 1) specifies whether to change codes 1
177
+ bit early.
178
+
179
+ min_bits: (Default 9) specifies the minimum number of bits to
180
+ use.
181
+
182
+ reverse_bits: (Default 0) allows for compatibility with gif and
183
+ old style tiffs (1).
184
+
185
+ old_tiff: (Default 0) allows for different handling of the clear
186
+ code, as found in old style tiffs.
187
+ */
188
+ fz_stream *fz_open_lzwd(fz_context *ctx, fz_stream *chain, int early_change, int min_bits, int reverse_bits, int old_tiff);
189
+
190
+ /**
191
+ predict filter performs pixel prediction on data read from
192
+ the chained filter.
193
+
194
+ predictor: 1 = copy, 2 = tiff, other = inline PNG predictor
195
+
196
+ columns: width of image in pixels
197
+
198
+ colors: number of components.
199
+
200
+ bpc: bits per component (typically 8)
201
+ */
202
+ fz_stream *fz_open_predict(fz_context *ctx, fz_stream *chain, int predictor, int columns, int colors, int bpc);
203
+
204
+ /**
205
+ Open a filter that performs jbig2 decompression on the chained
206
+ stream, using the optional globals record.
207
+ */
208
+ fz_stream *fz_open_jbig2d(fz_context *ctx, fz_stream *chain, fz_jbig2_globals *globals, int embedded);
209
+
210
+ /**
211
+ Create a jbig2 globals record from a buffer.
212
+
213
+ Immutable once created.
214
+ */
215
+ fz_jbig2_globals *fz_load_jbig2_globals(fz_context *ctx, fz_buffer *buf);
216
+
217
+ /**
218
+ Increment the reference count for a jbig2 globals record.
219
+
220
+ Never throws an exception.
221
+ */
222
+ fz_jbig2_globals *fz_keep_jbig2_globals(fz_context *ctx, fz_jbig2_globals *globals);
223
+
224
+ /**
225
+ Decrement the reference count for a jbig2 globals record.
226
+ When the reference count hits zero, the record is freed.
227
+
228
+ Never throws an exception.
229
+ */
230
+ void fz_drop_jbig2_globals(fz_context *ctx, fz_jbig2_globals *globals);
231
+
232
+ /**
233
+ Special jbig2 globals drop function for use in implementing
234
+ store support.
235
+ */
236
+ void fz_drop_jbig2_globals_imp(fz_context *ctx, fz_storable *globals);
237
+
238
+ /**
239
+ Return buffer containing jbig2 globals data stream.
240
+ */
241
+ fz_buffer * fz_jbig2_globals_data(fz_context *ctx, fz_jbig2_globals *globals);
242
+
243
+ /* Extra filters for tiff */
244
+
245
+ /**
246
+ SGI Log 16bit (greyscale) decode from the chained filter.
247
+ Decodes lines of w pixels to 8bpp greyscale.
248
+ */
249
+ fz_stream *fz_open_sgilog16(fz_context *ctx, fz_stream *chain, int w);
250
+
251
+ /**
252
+ SGI Log 24bit (LUV) decode from the chained filter.
253
+ Decodes lines of w pixels to 8bpc rgb.
254
+ */
255
+ fz_stream *fz_open_sgilog24(fz_context *ctx, fz_stream *chain, int w);
256
+
257
+ /**
258
+ SGI Log 32bit (LUV) decode from the chained filter.
259
+ Decodes lines of w pixels to 8bpc rgb.
260
+ */
261
+ fz_stream *fz_open_sgilog32(fz_context *ctx, fz_stream *chain, int w);
262
+
263
+ /**
264
+ 4bit greyscale Thunderscan decoding from the chained filter.
265
+ Decodes lines of w pixels to 8bpp greyscale.
266
+ */
267
+ fz_stream *fz_open_thunder(fz_context *ctx, fz_stream *chain, int w);
268
+
269
+ #endif