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,68 @@
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_PDF_CLEAN_H
24
+ #define MUPDF_PDF_CLEAN_H
25
+
26
+ #include "mupdf/pdf/document.h"
27
+ #include "mupdf/pdf/image-rewriter.h"
28
+
29
+ /**
30
+ Specifies whether the PDF's structure tree should be dropped or
31
+ kept when rearranging or subsetting its pages.
32
+
33
+ PDF_CLEAN_STRUCTURE_DROP: Remove the structure tree entirely.
34
+
35
+ PDF_CLEAN_STRUCTURE_KEEP: Preserve the structure tree. When
36
+ redacting a document, preserving the structure tree might leak
37
+ information.
38
+ */
39
+ typedef enum {
40
+ PDF_CLEAN_STRUCTURE_DROP = 0,
41
+ PDF_CLEAN_STRUCTURE_KEEP = 1
42
+ } pdf_clean_options_structure;
43
+
44
+ typedef struct
45
+ {
46
+ pdf_write_options write;
47
+ pdf_image_rewriter_options image;
48
+
49
+ int subset_fonts;
50
+
51
+ /* 0 to drop the structure tree (default).
52
+ * 1 to keep it unchanged.
53
+ * Future values reserved.
54
+ */
55
+ pdf_clean_options_structure structure;
56
+ } pdf_clean_options;
57
+
58
+ /*
59
+ Read infile, and write selected pages to outfile with the given options.
60
+ */
61
+ void pdf_clean_file(fz_context *ctx, char *infile, char *outfile, char *password, pdf_clean_options *opts, int retainlen, char *retainlist[]);
62
+
63
+ /*
64
+ Recreate page tree to include only the pages listed in the array, in the order listed.
65
+ */
66
+ void pdf_rearrange_pages(fz_context *ctx, pdf_document *doc, int count, const int *pages, pdf_clean_options_structure structure);
67
+
68
+ #endif
@@ -0,0 +1,145 @@
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_PDF_CMAP_H
24
+ #define MUPDF_PDF_CMAP_H
25
+
26
+ #include "mupdf/fitz/store.h"
27
+ #include "mupdf/pdf/document.h"
28
+
29
+ #define PDF_MRANGE_CAP 32
30
+
31
+ typedef struct
32
+ {
33
+ unsigned short low, high, out;
34
+ } pdf_range;
35
+
36
+ typedef struct
37
+ {
38
+ unsigned int low, high, out;
39
+ } pdf_xrange;
40
+
41
+ typedef struct
42
+ {
43
+ unsigned int low, out;
44
+ } pdf_mrange;
45
+
46
+ typedef struct cmap_splay cmap_splay;
47
+
48
+ typedef struct pdf_cmap
49
+ {
50
+ fz_storable storable;
51
+ char cmap_name[32];
52
+
53
+ char usecmap_name[32];
54
+ struct pdf_cmap *usecmap;
55
+
56
+ int wmode;
57
+
58
+ int codespace_len;
59
+ struct
60
+ {
61
+ int n;
62
+ unsigned int low;
63
+ unsigned int high;
64
+ } codespace[40];
65
+
66
+ int rlen, rcap;
67
+ pdf_range *ranges;
68
+
69
+ int xlen, xcap;
70
+ pdf_xrange *xranges;
71
+
72
+ int mlen, mcap;
73
+ pdf_mrange *mranges;
74
+
75
+ int dlen, dcap;
76
+ int *dict;
77
+
78
+ int tlen, tcap, ttop;
79
+ cmap_splay *tree;
80
+ } pdf_cmap;
81
+
82
+ pdf_cmap *pdf_new_cmap(fz_context *ctx);
83
+ pdf_cmap *pdf_keep_cmap(fz_context *ctx, pdf_cmap *cmap);
84
+ void pdf_drop_cmap(fz_context *ctx, pdf_cmap *cmap);
85
+ void pdf_drop_cmap_imp(fz_context *ctx, fz_storable *cmap);
86
+ size_t pdf_cmap_size(fz_context *ctx, pdf_cmap *cmap);
87
+
88
+ int pdf_cmap_wmode(fz_context *ctx, pdf_cmap *cmap);
89
+ void pdf_set_cmap_wmode(fz_context *ctx, pdf_cmap *cmap, int wmode);
90
+ void pdf_set_usecmap(fz_context *ctx, pdf_cmap *cmap, pdf_cmap *usecmap);
91
+
92
+ /*
93
+ Add a codespacerange section.
94
+ These ranges are used by pdf_decode_cmap to decode
95
+ multi-byte encoded strings.
96
+ */
97
+ void pdf_add_codespace(fz_context *ctx, pdf_cmap *cmap, unsigned int low, unsigned int high, size_t n);
98
+
99
+ /*
100
+ Add a range of contiguous one-to-one mappings (i.e. 1..5 maps to 21..25)
101
+ */
102
+ void pdf_map_range_to_range(fz_context *ctx, pdf_cmap *cmap, unsigned int srclo, unsigned int srchi, int dstlo);
103
+
104
+ /*
105
+ Add a single one-to-many mapping.
106
+
107
+ len <= 256.
108
+ */
109
+ void pdf_map_one_to_many(fz_context *ctx, pdf_cmap *cmap, unsigned int one, int *many, size_t len);
110
+ void pdf_sort_cmap(fz_context *ctx, pdf_cmap *cmap);
111
+
112
+ /*
113
+ Lookup the mapping of a codepoint.
114
+ */
115
+ int pdf_lookup_cmap(pdf_cmap *cmap, unsigned int cpt);
116
+ int pdf_lookup_cmap_full(pdf_cmap *cmap, unsigned int cpt, int *out);
117
+
118
+ /*
119
+ Use the codespace ranges to extract a codepoint from a
120
+ multi-byte encoded string.
121
+ */
122
+ int pdf_decode_cmap(pdf_cmap *cmap, unsigned char *s, unsigned char *e, unsigned int *cpt);
123
+
124
+ /*
125
+ Create an Identity-* CMap (for both 1 and 2-byte encodings)
126
+ */
127
+ pdf_cmap *pdf_new_identity_cmap(fz_context *ctx, int wmode, int bytes);
128
+ pdf_cmap *pdf_load_cmap(fz_context *ctx, fz_stream *file);
129
+
130
+ /*
131
+ Load predefined CMap from system.
132
+ */
133
+ pdf_cmap *pdf_load_system_cmap(fz_context *ctx, const char *name);
134
+
135
+ /*
136
+ Load built-in CMap resource.
137
+ */
138
+ pdf_cmap *pdf_load_builtin_cmap(fz_context *ctx, const char *name);
139
+
140
+ /*
141
+ Load CMap stream in PDF file
142
+ */
143
+ pdf_cmap *pdf_load_embedded_cmap(fz_context *ctx, pdf_document *doc, pdf_obj *ref);
144
+
145
+ #endif
@@ -0,0 +1,108 @@
1
+ // Copyright (C) 2004-2023 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_PDF_CRYPT_H
24
+ #define MUPDF_PDF_CRYPT_H
25
+
26
+ #include "mupdf/pdf/document.h"
27
+ #include "mupdf/pdf/object.h"
28
+
29
+ enum
30
+ {
31
+ PDF_ENCRYPT_KEEP,
32
+ PDF_ENCRYPT_NONE,
33
+ PDF_ENCRYPT_RC4_40,
34
+ PDF_ENCRYPT_RC4_128,
35
+ PDF_ENCRYPT_AES_128,
36
+ PDF_ENCRYPT_AES_256,
37
+ PDF_ENCRYPT_UNKNOWN
38
+ };
39
+
40
+ /*
41
+ Create crypt object for decrypting strings and streams
42
+ given the Encryption and ID objects.
43
+ */
44
+ pdf_crypt *pdf_new_crypt(fz_context *ctx, pdf_obj *enc, pdf_obj *id);
45
+ pdf_crypt *pdf_new_encrypt(fz_context *ctx, const char *opwd_utf8, const char *upwd_utf8, pdf_obj *id, int permissions, int algorithm);
46
+ void pdf_drop_crypt(fz_context *ctx, pdf_crypt *crypt);
47
+
48
+ void pdf_crypt_obj(fz_context *ctx, pdf_crypt *crypt, pdf_obj *obj, int num, int gen);
49
+ fz_stream *pdf_open_crypt(fz_context *ctx, fz_stream *chain, pdf_crypt *crypt, int num, int gen);
50
+ fz_stream *pdf_open_crypt_with_filter(fz_context *ctx, fz_stream *chain, pdf_crypt *crypt, pdf_obj *name, int num, int gen);
51
+
52
+ int pdf_crypt_version(fz_context *ctx, pdf_crypt *crypt);
53
+ int pdf_crypt_revision(fz_context *ctx, pdf_crypt *crypt);
54
+ const char *pdf_crypt_method(fz_context *ctx, pdf_crypt *crypt);
55
+ const char *pdf_crypt_string_method(fz_context *ctx, pdf_crypt *crypt);
56
+ const char *pdf_crypt_stream_method(fz_context *ctx, pdf_crypt *crypt);
57
+ int pdf_crypt_length(fz_context *ctx, pdf_crypt *crypt);
58
+ int pdf_crypt_permissions(fz_context *ctx, pdf_crypt *crypt);
59
+ int pdf_crypt_encrypt_metadata(fz_context *ctx, pdf_crypt *crypt);
60
+ unsigned char *pdf_crypt_owner_password(fz_context *ctx, pdf_crypt *crypt);
61
+ unsigned char *pdf_crypt_user_password(fz_context *ctx, pdf_crypt *crypt);
62
+ unsigned char *pdf_crypt_owner_encryption(fz_context *ctx, pdf_crypt *crypt);
63
+ unsigned char *pdf_crypt_user_encryption(fz_context *ctx, pdf_crypt *crypt);
64
+ unsigned char *pdf_crypt_permissions_encryption(fz_context *ctx, pdf_crypt *crypt);
65
+ unsigned char *pdf_crypt_key(fz_context *ctx, pdf_crypt *crypt);
66
+
67
+ void pdf_print_crypt(fz_context *ctx, fz_output *out, pdf_crypt *crypt);
68
+
69
+ void pdf_write_digest(fz_context *ctx, fz_output *out, pdf_obj *byte_range, pdf_obj *field, size_t digest_offset, size_t digest_length, pdf_pkcs7_signer *signer);
70
+
71
+ /*
72
+ User access permissions from PDF reference.
73
+ */
74
+ enum
75
+ {
76
+ PDF_PERM_PRINT = 1 << 2,
77
+ PDF_PERM_MODIFY = 1 << 3,
78
+ PDF_PERM_COPY = 1 << 4,
79
+ PDF_PERM_ANNOTATE = 1 << 5,
80
+ PDF_PERM_FORM = 1 << 8,
81
+ PDF_PERM_ACCESSIBILITY = 1 << 9, /* deprecated in pdf 2.0 (this permission is always granted) */
82
+ PDF_PERM_ASSEMBLE = 1 << 10,
83
+ PDF_PERM_PRINT_HQ = 1 << 11,
84
+ };
85
+
86
+ int pdf_document_permissions(fz_context *ctx, pdf_document *doc);
87
+
88
+ int pdf_signature_byte_range(fz_context *ctx, pdf_document *doc, pdf_obj *signature, fz_range *byte_range);
89
+
90
+ /*
91
+ retrieve an fz_stream to read the bytes hashed for the signature
92
+ */
93
+ fz_stream *pdf_signature_hash_bytes(fz_context *ctx, pdf_document *doc, pdf_obj *signature);
94
+
95
+ int pdf_signature_incremental_change_since_signing(fz_context *ctx, pdf_document *doc, pdf_obj *signature);
96
+ int pdf_incremental_change_since_signing_widget(fz_context *ctx, pdf_annot *widget);
97
+
98
+ /*
99
+ Retrieve the contents of a signature as a counted allocated
100
+ block that must be freed by the caller.
101
+ */
102
+ size_t pdf_signature_contents(fz_context *ctx, pdf_document *doc, pdf_obj *signature, char **contents);
103
+
104
+ void pdf_encrypt_data(fz_context *ctx, pdf_crypt *crypt, int num, int gen, void (*fmt_str_out)(fz_context *, void *, const unsigned char *, size_t), void *arg, const unsigned char *s, size_t n);
105
+
106
+ size_t pdf_encrypted_len(fz_context *ctx, pdf_crypt *crypt, int num, int gen, size_t len);
107
+
108
+ #endif