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,57 @@
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 TRACK_USAGE_H
24
+ #define TRACK_USAGE_H
25
+
26
+ #ifdef TRACK_USAGE
27
+
28
+ typedef struct track_usage_data {
29
+ int count;
30
+ const char *function;
31
+ int line;
32
+ const char *desc;
33
+ struct track_usage_data *next;
34
+ } track_usage_data;
35
+
36
+ #define TRACK_LABEL(A) \
37
+ do { \
38
+ static track_usage_data USAGE_DATA = { 0 };\
39
+ track_usage(&USAGE_DATA, __FILE__, __LINE__, A);\
40
+ } while (0)
41
+
42
+ #define TRACK_FN() \
43
+ do { \
44
+ static track_usage_data USAGE_DATA = { 0 };\
45
+ track_usage(&USAGE_DATA, __FILE__, __LINE__, __FUNCTION__);\
46
+ } while (0)
47
+
48
+ void track_usage(track_usage_data *data, const char *function, int line, const char *desc);
49
+
50
+ #else
51
+
52
+ #define TRACK_LABEL(A) do { } while (0)
53
+ #define TRACK_FN() do { } while (0)
54
+
55
+ #endif
56
+
57
+ #endif
@@ -0,0 +1,76 @@
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_TRANSITION_H
24
+ #define MUPDF_FITZ_TRANSITION_H
25
+
26
+ #include "mupdf/fitz/system.h"
27
+ #include "mupdf/fitz/pixmap.h"
28
+
29
+ /* Transition support */
30
+ enum {
31
+ FZ_TRANSITION_NONE = 0, /* aka 'R' or 'REPLACE' */
32
+ FZ_TRANSITION_SPLIT,
33
+ FZ_TRANSITION_BLINDS,
34
+ FZ_TRANSITION_BOX,
35
+ FZ_TRANSITION_WIPE,
36
+ FZ_TRANSITION_DISSOLVE,
37
+ FZ_TRANSITION_GLITTER,
38
+ FZ_TRANSITION_FLY,
39
+ FZ_TRANSITION_PUSH,
40
+ FZ_TRANSITION_COVER,
41
+ FZ_TRANSITION_UNCOVER,
42
+ FZ_TRANSITION_FADE
43
+ };
44
+
45
+ typedef struct
46
+ {
47
+ int type;
48
+ float duration; /* Effect duration (seconds) */
49
+
50
+ /* Parameters controlling the effect */
51
+ int vertical; /* 0 or 1 */
52
+ int outwards; /* 0 or 1 */
53
+ int direction; /* Degrees */
54
+ /* Potentially more to come */
55
+
56
+ /* State variables for use of the transition code */
57
+ int state0;
58
+ int state1;
59
+ } fz_transition;
60
+
61
+ /**
62
+ Generate a frame of a transition.
63
+
64
+ tpix: Target pixmap
65
+ opix: Old pixmap
66
+ npix: New pixmap
67
+ time: Position within the transition (0 to 256)
68
+ trans: Transition details
69
+
70
+ Returns 1 if successfully generated a frame.
71
+
72
+ Note: Pixmaps must include alpha.
73
+ */
74
+ int fz_generate_transition(fz_context *ctx, fz_pixmap *tpix, fz_pixmap *opix, fz_pixmap *npix, int time, fz_transition *trans);
75
+
76
+ #endif
@@ -0,0 +1,62 @@
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_TREE_H
24
+ #define MUPDF_FITZ_TREE_H
25
+
26
+ #include "mupdf/fitz/system.h"
27
+ #include "mupdf/fitz/context.h"
28
+
29
+ /**
30
+ AA-tree to look up things by strings.
31
+ */
32
+
33
+ typedef struct fz_tree fz_tree;
34
+
35
+ /**
36
+ Look for the value of a node in the tree with the given key.
37
+
38
+ Simple pointer equivalence is used for key.
39
+
40
+ Returns NULL for no match.
41
+ */
42
+ void *fz_tree_lookup(fz_context *ctx, fz_tree *node, const char *key);
43
+
44
+ /**
45
+ Insert a new key/value pair and rebalance the tree.
46
+ Return the new root of the tree after inserting and rebalancing.
47
+ May be called with a NULL root to create a new tree.
48
+
49
+ No data is copied into the tree structure; key and value are
50
+ merely kept as pointers.
51
+ */
52
+ fz_tree *fz_tree_insert(fz_context *ctx, fz_tree *root, const char *key, void *value);
53
+
54
+ /**
55
+ Drop the tree.
56
+
57
+ The storage used by the tree is freed, and each value has
58
+ dropfunc called on it.
59
+ */
60
+ void fz_drop_tree(fz_context *ctx, fz_tree *node, void (*dropfunc)(fz_context *ctx, void *value));
61
+
62
+ #endif
@@ -0,0 +1,41 @@
1
+ // Copyright (C) 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_TYPES_H
24
+ #define MUPDF_FITZ_TYPES_H
25
+
26
+ typedef struct fz_document fz_document;
27
+
28
+ /**
29
+ Locations within the document are referred to in terms of
30
+ chapter and page, rather than just a page number. For some
31
+ documents (such as epub documents with large numbers of pages
32
+ broken into many chapters) this can make navigation much faster
33
+ as only the required chapter needs to be decoded at a time.
34
+ */
35
+ typedef struct
36
+ {
37
+ int chapter;
38
+ int page;
39
+ } fz_location;
40
+
41
+ #endif
@@ -0,0 +1,159 @@
1
+ // Copyright (C) 2004-2024 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_UTIL_H
24
+ #define MUPDF_FITZ_UTIL_H
25
+
26
+ #include "mupdf/fitz/system.h"
27
+ #include "mupdf/fitz/context.h"
28
+ #include "mupdf/fitz/geometry.h"
29
+ #include "mupdf/fitz/document.h"
30
+ #include "mupdf/fitz/pixmap.h"
31
+ #include "mupdf/fitz/structured-text.h"
32
+ #include "mupdf/fitz/buffer.h"
33
+ #include "mupdf/fitz/xml.h"
34
+ #include "mupdf/fitz/archive.h"
35
+ #include "mupdf/fitz/display-list.h"
36
+
37
+ /**
38
+ Create a display list.
39
+
40
+ Ownership of the display list is returned to the caller.
41
+ */
42
+ fz_display_list *fz_new_display_list_from_page(fz_context *ctx, fz_page *page);
43
+ fz_display_list *fz_new_display_list_from_page_number(fz_context *ctx, fz_document *doc, int number);
44
+
45
+ /**
46
+ Create a display list from page contents (no annotations).
47
+
48
+ Ownership of the display list is returned to the caller.
49
+ */
50
+ fz_display_list *fz_new_display_list_from_page_contents(fz_context *ctx, fz_page *page);
51
+
52
+ /**
53
+ Render the page to a pixmap using the transform and colorspace.
54
+
55
+ Ownership of the pixmap is returned to the caller.
56
+ */
57
+ fz_pixmap *fz_new_pixmap_from_display_list(fz_context *ctx, fz_display_list *list, fz_matrix ctm, fz_colorspace *cs, int alpha);
58
+ fz_pixmap *fz_new_pixmap_from_page(fz_context *ctx, fz_page *page, fz_matrix ctm, fz_colorspace *cs, int alpha);
59
+ fz_pixmap *fz_new_pixmap_from_page_number(fz_context *ctx, fz_document *doc, int number, fz_matrix ctm, fz_colorspace *cs, int alpha);
60
+
61
+ /**
62
+ Render the page contents without annotations.
63
+
64
+ Ownership of the pixmap is returned to the caller.
65
+ */
66
+ fz_pixmap *fz_new_pixmap_from_page_contents(fz_context *ctx, fz_page *page, fz_matrix ctm, fz_colorspace *cs, int alpha);
67
+
68
+ /**
69
+ Render the page contents with control over spot colors.
70
+
71
+ Ownership of the pixmap is returned to the caller.
72
+ */
73
+ fz_pixmap *fz_new_pixmap_from_display_list_with_separations(fz_context *ctx, fz_display_list *list, fz_matrix ctm, fz_colorspace *cs, fz_separations *seps, int alpha);
74
+ fz_pixmap *fz_new_pixmap_from_page_with_separations(fz_context *ctx, fz_page *page, fz_matrix ctm, fz_colorspace *cs, fz_separations *seps, int alpha);
75
+ fz_pixmap *fz_new_pixmap_from_page_number_with_separations(fz_context *ctx, fz_document *doc, int number, fz_matrix ctm, fz_colorspace *cs, fz_separations *seps, int alpha);
76
+ fz_pixmap *fz_new_pixmap_from_page_contents_with_separations(fz_context *ctx, fz_page *page, fz_matrix ctm, fz_colorspace *cs, fz_separations *seps, int alpha);
77
+
78
+ fz_pixmap *fz_fill_pixmap_from_display_list(fz_context *ctx, fz_display_list *list, fz_matrix ctm, fz_pixmap *pix);
79
+
80
+ /**
81
+ Extract text from page.
82
+
83
+ Ownership of the fz_stext_page is returned to the caller.
84
+ */
85
+ fz_stext_page *fz_new_stext_page_from_page(fz_context *ctx, fz_page *page, const fz_stext_options *options);
86
+ fz_stext_page *fz_new_stext_page_from_page_number(fz_context *ctx, fz_document *doc, int number, const fz_stext_options *options);
87
+ fz_stext_page *fz_new_stext_page_from_chapter_page_number(fz_context *ctx, fz_document *doc, int chapter, int number, const fz_stext_options *options);
88
+ fz_stext_page *fz_new_stext_page_from_display_list(fz_context *ctx, fz_display_list *list, const fz_stext_options *options);
89
+
90
+ /**
91
+ Convert structured text into plain text.
92
+ */
93
+ fz_buffer *fz_new_buffer_from_stext_page(fz_context *ctx, fz_stext_page *text);
94
+ fz_buffer *fz_new_buffer_from_page(fz_context *ctx, fz_page *page, const fz_stext_options *options);
95
+ fz_buffer *fz_new_buffer_from_page_number(fz_context *ctx, fz_document *doc, int number, const fz_stext_options *options);
96
+ fz_buffer *fz_new_buffer_from_display_list(fz_context *ctx, fz_display_list *list, const fz_stext_options *options);
97
+
98
+ /**
99
+ Search for the 'needle' text on the page.
100
+ Record the hits in the hit_bbox array and return the number of
101
+ hits. Will stop looking once it has filled hit_max rectangles.
102
+ */
103
+ int fz_search_page(fz_context *ctx, fz_page *page, const char *needle, int *hit_mark, fz_quad *hit_bbox, int hit_max);
104
+ int fz_search_page_number(fz_context *ctx, fz_document *doc, int number, const char *needle, int *hit_mark, fz_quad *hit_bbox, int hit_max);
105
+ int fz_search_chapter_page_number(fz_context *ctx, fz_document *doc, int chapter, int page, const char *needle, int *hit_mark, fz_quad *hit_bbox, int hit_max);
106
+ int fz_search_display_list(fz_context *ctx, fz_display_list *list, const char *needle, int *hit_mark, fz_quad *hit_bbox, int hit_max);
107
+
108
+ /**
109
+ Search for the 'needle' text on the page.
110
+ */
111
+ int fz_search_page_cb(fz_context *ctx, fz_page *page, const char *needle, fz_search_callback_fn *cb, void *opaque);
112
+ int fz_search_page_number_cb(fz_context *ctx, fz_document *doc, int number, const char *needle, fz_search_callback_fn *cb, void *opaque);
113
+ int fz_search_chapter_page_number_cb(fz_context *ctx, fz_document *doc, int chapter, int page, const char *needle, fz_search_callback_fn *cb, void *opaque);
114
+ int fz_search_display_list_cb(fz_context *ctx, fz_display_list *list, const char *needle, fz_search_callback_fn *cb, void *opaque);
115
+
116
+ /**
117
+ Parse an SVG document into a display-list.
118
+ */
119
+ fz_display_list *fz_new_display_list_from_svg(fz_context *ctx, fz_buffer *buf, const char *base_uri, fz_archive *dir, float *w, float *h);
120
+
121
+ /**
122
+ Create a scalable image from an SVG document.
123
+ */
124
+ fz_image *fz_new_image_from_svg(fz_context *ctx, fz_buffer *buf, const char *base_uri, fz_archive *dir);
125
+
126
+ /**
127
+ Parse an SVG document into a display-list.
128
+ */
129
+ fz_display_list *fz_new_display_list_from_svg_xml(fz_context *ctx, fz_xml_doc *xmldoc, fz_xml *xml, const char *base_uri, fz_archive *dir, float *w, float *h);
130
+
131
+ /**
132
+ Create a scalable image from an SVG document.
133
+ */
134
+ fz_image *fz_new_image_from_svg_xml(fz_context *ctx, fz_xml_doc *xmldoc, fz_xml *xml, const char *base_uri, fz_archive *dir);
135
+
136
+ /**
137
+ Write image as a data URI (for HTML and SVG output).
138
+ */
139
+ void fz_write_image_as_data_uri(fz_context *ctx, fz_output *out, fz_image *image);
140
+ void fz_write_pixmap_as_data_uri(fz_context *ctx, fz_output *out, fz_pixmap *pixmap);
141
+ void fz_append_image_as_data_uri(fz_context *ctx, fz_buffer *out, fz_image *image);
142
+ void fz_append_pixmap_as_data_uri(fz_context *ctx, fz_buffer *out, fz_pixmap *pixmap);
143
+
144
+ /**
145
+ Use text extraction to convert the input document into XHTML,
146
+ then open the result as a new document that can be reflowed.
147
+ */
148
+ fz_document *fz_new_xhtml_document_from_document(fz_context *ctx, fz_document *old_doc, const fz_stext_options *opts);
149
+
150
+ /**
151
+ Returns an fz_buffer containing a page after conversion to specified format.
152
+
153
+ page: The page to convert.
154
+ format, options: Passed to fz_new_document_writer_with_output() internally.
155
+ transform, cookie: Passed to fz_run_page() internally.
156
+ */
157
+ fz_buffer *fz_new_buffer_from_page_with_format(fz_context *ctx, fz_page *page, const char *format, const char *options, fz_matrix transform, fz_cookie *cookie);
158
+
159
+ #endif
@@ -0,0 +1,31 @@
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_VERSION_H
24
+ #define MUPDF_FITZ_VERSION_H
25
+ #ifndef FZ_VERSION
26
+ #define FZ_VERSION "1.26.11"
27
+ #define FZ_VERSION_MAJOR 1
28
+ #define FZ_VERSION_MINOR 26
29
+ #define FZ_VERSION_PATCH 11
30
+ #endif
31
+ #endif