forked from pymupdf/PyMuPDF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
changes.txt
2434 lines (1514 loc) · 155 KB
/
changes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Change Log
==========
**Changes in version 1.24.7 (2024-06-26)**
* Fixed issues:
* **Fixed** `3615 <https://github.com/pymupdf/PyMuPDF/issues/3615>`_: Document.pagemode or Document.pagelayout crashes for epub files
* **Fixed** `3616 <https://github.com/pymupdf/PyMuPDF/issues/3616>`_: not last version reported
**Changes in version 1.24.6 (2024-06-25)**
* Fixed issues:
* **Fixed** `3599 <https://github.com/pymupdf/PyMuPDF/issues/3599>`_: Story.fit_width() has a weird line
* **Fixed** `3594 <https://github.com/pymupdf/PyMuPDF/issues/3594>`_: Garbled extraction for Amazon Sustainability Report
* **Fixed** `3591 <https://github.com/pymupdf/PyMuPDF/issues/3591>`_: 'width' in Page.get_drawings() returns width equal as 0
* **Fixed** `3561 <https://github.com/pymupdf/PyMuPDF/issues/3561>`_: ZeroDivisionError: float division by zero with page.apply_redactions()
* **Fixed** `3559 <https://github.com/pymupdf/PyMuPDF/issues/3559>`_: SegFault 11 when empty H1 H2 H3 H4 etc element is used in insert_htmlbox
* **Fixed** `3539 <https://github.com/pymupdf/PyMuPDF/issues/3539>`_: Add dotted gridline detection to table recognition
* **Fixed** `3519 <https://github.com/pymupdf/PyMuPDF/issues/3519>`_: get_toc(simple=False) AttributeError: 'Outline' object has no attribute 'rect'
* **Fixed** `3510 <https://github.com/pymupdf/PyMuPDF/issues/3510>`_: page.get_label() gets wrong label on the first page of doc
* **Fixed** `3494 <https://github.com/pymupdf/PyMuPDF/issues/3494>`_: 1.24.2/1.24.3: spurious characters introduced when using subset_fonts and insert_pdf
* **Fixed** `3470 <https://github.com/pymupdf/PyMuPDF/issues/3470>`_: subset_fonts error exit without exception/warning
* **Fixed** `3400 <https://github.com/pymupdf/PyMuPDF/issues/3400>`_: set_toc alters link coordinates for some rotated pages on pymupdf 1.24.2
* **Fixed** `3347 <https://github.com/pymupdf/PyMuPDF/issues/3347>`_: Incorrect links to points on pages having different heights
* **Fixed** `3237 <https://github.com/pymupdf/PyMuPDF/issues/3237>`_: Set_metadata() does not work
* **Fixed** `3493 <https://github.com/pymupdf/PyMuPDF/discussions/3493>`_: Isolate PyMuPDF from other libraries; issues when PyMuPDF is loaded with other libraries like GdkPixbuf
* Other:
* Fixed concurrent use of PyMuPDF caused by use of constant temporary filenames.
* Add musllinux x86_64 wheels to release.
* Added clearer version information:
* `pymupdf.pymupdf_version`.
* `pymupdf.mupdf_version`.
* `pymupdf.pymupdf_date`.
**Changes in version 1.24.5 (2024-05-30)**
* Fixed issues:
* **Fixed** `3479 <https://github.com/pymupdf/PyMuPDF/issues/3479>`_: regression: fill_textbox: IndexError: pop from empty list
* **Fixed** `3488 <https://github.com/pymupdf/PyMuPDF/issues/3488>`_: set_toc method error
* Other:
* Some more fixes to use MuPDF floating formatting.
* Removed/disabled some unnecessary diagnostics.
* Fixed utils.do_links() crash.
* Experimental new functions `pymupdf.apply_pages()` and `pymupdf.get_text()`.
* Addresses wrong label generation for label styles "a" and "A".
**Changes in version 1.24.4 (2024-05-16)**
* **Fixed** `3418 <https://github.com/pymupdf/PyMuPDF/issues/3418>`_: Re-introduced bug, text align add_redact_annot
* **Fixed** `3472 <https://github.com/pymupdf/PyMuPDF/issues/3472>`_: insert_pdf gives SystemError
* Other:
* Fixed sysinstall test failing to remove all of prior installation before
new install.
* Fixed `utils.do_links()` crash.
* Correct `TextPage` creation Code.
* Unified various diagnostics.
* Fix bug in `page_merge()`.
**Changes in version 1.24.3 (2024-05-09)**
*
The Python module is now called `pymupdf`. `fitz` is still supported for
backwards compatibility.
* Use MuPDF-1.24.2.
* Fixed issues:
* **Fixed** `3357 <https://github.com/pymupdf/PyMuPDF/issues/3357>`_: PyMuPDF==1.24.0 will hanging when using page.get_text("text")
* **Fixed** `3376 <https://github.com/pymupdf/PyMuPDF/issues/3376>`_: Redacting results are not as expected in 1.24.x.
* **Fixed** `3379 <https://github.com/pymupdf/PyMuPDF/issues/3379>`_: Documentation mismatch for get_text_blocks return value order.
* **Fixed** `3381 <https://github.com/pymupdf/PyMuPDF/issues/3381>`_: Contents stream contains floats in scientific notation
* **Fixed** `3402 <https://github.com/pymupdf/PyMuPDF/issues/3402>`_: Cannot add Widgets containing inter-field-calculation JavaScript
* **Fixed** `3414 <https://github.com/pymupdf/PyMuPDF/issues/3414>`_: missing attribute set_dpi()
* **Fixed** `3430 <https://github.com/pymupdf/PyMuPDF/issues/3430>`_: page.get_text() cause process freeze with certain pdf on v1.24.2
* Other:
* New/modified methods:
* `Page.remove_rotation()`: new, set page rotation to zero while keeping appearance.
* Fixed some problems when checking for PDF properties.
* Fixed pip builds from sdist
(see discussion `3360 <https://github.com/pymupdf/PyMuPDF/discussions/3360>`_:
Alpine linux docker build failing "No matching distribution found for pymupdfb==1.24.1").
**Changes in version 1.24.2 (2024-04-17)**
* Removed obsolete classic implementation from releases
(previously available as module `fitz_old`).
* Fixed issues:
* **Fixed** `3331 <https://github.com/pymupdf/PyMuPDF/issues/3331>`_: Document.pages() is incorrectly type-hinted
* **Fixed** `3354 <https://github.com/pymupdf/PyMuPDF/issues/3354>`_: PyMuPDF==1.24.1: AttributeError: property 'metadata' of 'Document' object has no setter
* Other:
* New/modified methods:
* `Document.bake()`: new, make annotations / fields permanent content.
* `Page.cluster_drawings()`: new, identifies drawing items
(i.e. vector graphics or line-art)
that belong together based on their geometrical vicinity.
* `Page.apply_redactions()`: added new parameter `text`.
* `Document.subset_fonts()`: use MuPDF's `pdf_subset_fonts()` instead of PyMuPDF code.
* The `Document` class now supports page numbers specified as slices.
* Avoid causing MuPDF warnings.
**Changes in version 1.24.1 (2024-04-02)**
* Fixed issues:
* **Fixed** `3278 <https://github.com/pymupdf/PyMuPDF/issues/3278>`_: apply_redactions moves some unredacted text
* **Fixed** `3301 <https://github.com/pymupdf/PyMuPDF/issues/3301>`_: Be more permissive when classifying links as kind LINK_URI
* **Fixed** `3306 <https://github.com/pymupdf/PyMuPDF/issues/3306>`_: Text containing capital 'ET' not appearing as annotation
* Other:
* Use MuPDF-1.24.1.
* Support ObjStm Compression.
Methods `Document.save()`, `Document.ez_save()` and `Document.write()`
now support new parameters `use_objstm`, compression_effort` and
`preserve_metadata`.
**Changes in version 1.24.0 (2024-03-21)**
* Fixed issues:
* **Fixed** `3281 <https://github.com/pymupdf/PyMuPDF/issues/3281>`_: Preparing metadata (pyproject.toml) did not run successfully
* **Fixed** `3279 <https://github.com/pymupdf/PyMuPDF/issues/3279>`_: PyMuPDF no longer builds in Alpine Linux
* **Fixed** `3257 <https://github.com/pymupdf/PyMuPDF/issues/3257>`_: apply_redactions() deleting text outside of annoted box
* **Fixed** `3216 <https://github.com/pymupdf/PyMuPDF/issues/3216>`_: AttributeError: 'Annot' object has no attribute '__del__'
* **Fixed** `3207 <https://github.com/pymupdf/PyMuPDF/issues/3207>`_: get_drawings's items is missing line from h path operator
* **Fixed** `3201 <https://github.com/pymupdf/PyMuPDF/issues/3201>`_: Memory leaks when merging PDFs
* **Fixed** `3197 <https://github.com/pymupdf/PyMuPDF/issues/3197>`_: page.get_text() returns hexadecimal text for some characters
* **Fixed** `3196 <https://github.com/pymupdf/PyMuPDF/issues/3196>`_: Remove text not working in 1.23.25 version vs 1.20.2
* **Fixed** `3172 <https://github.com/pymupdf/PyMuPDF/issues/3172>`_: PDF's 45º lines dissapearing in png conversion
* **Fixed** `3135 <https://github.com/pymupdf/PyMuPDF/issues/3135>`_: Do not log warnings to stdout
* **Fixed** `3125 <https://github.com/pymupdf/PyMuPDF/issues/3125>`_: get_pixmap method stuck on one page and runs forever
* **Fixed** `2964 <https://github.com/pymupdf/PyMuPDF/issues/2964>`_: There is an issue with the image generated by the page.get_pixmap() function
* Other:
* Use MuPDF-1.24.0.
* Add support for redacting vector graphics.
* Several fixes for table module
* Add new method for outputting the table as a markdown string.
* Address errors in computing the table header object:
We now allow None as the cell value, because this will be resolved where
needed (e.g. in the pandas DataFrame).
We previously tried to enforce rect-like tuples in all header cell
bboxes, however this fails for tables with all-None columns. This fix
enables this and constructs an empty string in the corresponding cell
string.
We now correctly include start / stop points of lines in the bbox of the
clustered graphic. We previously joined the line's rectangle - which had
no effect because this is always empty.
* Improved exception text if we fail to open document.
* Fixed build with new libclang 18.
**Changes in version 1.23.26 (2024-02-29)**
* Fixed issues:
* **Fixed** `3199 <https://github.com/pymupdf/PyMuPDF/issues/3199>`_: Add entry_points to setuptools configuration to provide command-line console scripts
* **Fixed** `3209 <https://github.com/pymupdf/PyMuPDF/issues/3209>`_: Empty vertices in ink annotation
* Other:
* Improvements to table detection:
* Improved check for empty tables, fixes bugs when determining table headers.
* Improved computation of enveloping vector graphic rectangles.
* Ignore more meaningless "pseudo" tables
* Install command-line 'pymupdf' command that runs fitz/__main__.py.
* Don't overwrite MuPDF's config.h when building on non-Windows.
* Fix `Story` constructor's `archive` arg to match docs - now accepts a single `Archive` constructor arg.
* Do not include MuPDF source in sdist; will be downloaded automatically when building.
**Changes in version 1.23.25 (2024-02-20)**
* Fixed issues:
* **Fixed** `3182 <https://github.com/pymupdf/PyMuPDF/issues/3182>`_: Pixmap.invert_irect argument type error
* **Fixed** `3186 <https://github.com/pymupdf/PyMuPDF/issues/3186>`_: extractText() extracts broken text from pdf
* **Fixed** `3191 <https://github.com/pymupdf/PyMuPDF/issues/3191>`_: Error on .find_tables()
* Other:
* When building, be able to specify python-config directly, with environment
variable `PIPCL_PYTHON_CONFIG`.
**Changes in version 1.23.24 (2024-02-19)**
* Fixed issues:
* **Fixed** `3148 <https://github.com/pymupdf/PyMuPDF/issues/3148>`_: Table extraction - vertical text not handled correctly
* **Fixed** `3179 <https://github.com/pymupdf/PyMuPDF/issues/3179>`_: Table Detection: Incorrect Separation of Vector Graphics Clusters
* **Fixed** `3180 <https://github.com/pymupdf/PyMuPDF/issues/3180>`_: Cannot show optional content group: AttributeError: module 'fitz.mupdf' has no attribute 'pdf_array_push_drop'
* Other:
* Be able to test system install using `sudo pip install` instead of a venv.
**Changes in version 1.23.23 (2024-02-18)**
* Fixed issues:
* **Fixed** `3126 <https://github.com/pymupdf/PyMuPDF/issues/3126>`_: Initialising Archive with a pathlib.Path fails.
* **Fixed** `3131 <https://github.com/pymupdf/PyMuPDF/issues/3131>`_: Calling the next attribute of an Annot raises a "No attribute .parent" warning
* **Fixed** `3134 <https://github.com/pymupdf/PyMuPDF/issues/3134>`_: Using an IRect as clip parameter in Page.get_pixmap no longer works since 1.23.9
* **Fixed** `3140 <https://github.com/pymupdf/PyMuPDF/issues/3140>`_: PDF document stays in use after closing
* **Fixed** `3150 <https://github.com/pymupdf/PyMuPDF/issues/3150>`_: doc.select() hangs on this doc.
* **Fixed** `3163 <https://github.com/pymupdf/PyMuPDF/issues/3163>`_: AssertionError on using fitz.IRect
* **Fixed** `3177 <https://github.com/pymupdf/PyMuPDF/issues/3177>`_: fitz.Pixmap(None, pix) Unrecognised args for constructing Pixmap
* Other:
*
Improved `Document.select() by using new MuPDF function
`pdf_rearrange_pages()`. This is a more complete (and faster)
implementation of what needs to be done here in that not only pages will
be rearranged, but also consequential changes will be made to the table
of contents, links to removed pages and affected entries in the Optional
Content definitions.
* `TextWriter.appendv()`: added `small_caps` arg.
* Fixed some valgrind errors with MuPDF master.
* Fixed `Document.insert_image()` when build with MuPDF master.
**Changes in version 1.23.22 (2024-02-12)**
* Fixed issues:
* **Fixed** `3143 <https://github.com/pymupdf/PyMuPDF/issues/3143>`_: Difference in decoding of OCGs names between doc.get_ocgs() and page.get_drawings()
* **Fixed** `3139 <https://github.com/pymupdf/PyMuPDF/issues/3139>`_: Pixmap resizing needs positional arg "clip" - even if None.
* Other:
* Removed the use of MuPDF function `fz_image_size()` from PyMuPDF.
**Changes in version 1.23.21 (2024-02-01)**
* Fixed issues:
* Other:
* Fixed bug in set_xml_metadata(), PR `3112 https://github.com/pymupdf/PyMuPDF/pull/3112>`_: Fix pdf_add_stream metadata error
* Fixed lack of `.parent` member in `TextPage` from `Annot.get_textpage()`.
* Fixed bug in `Page.add_widget()`.
**Changes in version 1.23.20 (2024-01-29)**
* Bug fixes:
* **Fixed** `3100 <https://github.com/pymupdf/PyMuPDF/issues/3100>`_: Wrong internal property accessed in get_xml_metadata
* Other:
* Significantly improved speed of `Document.get_toc()`.
**Changes in version 1.23.19 (2024-01-25)**
* Bug fixes:
* **Fixed** `3087 <https://github.com/pymupdf/PyMuPDF/issues/3087>`_: Exception in insert_image with mask specified
* **Fixed** `3094 <https://github.com/pymupdf/PyMuPDF/issues/3094>`_: TypeError: '<' not supported between instances of 'FzLocation' and 'int' in doc.delete_pages
* Other:
* When finding tables:
* Allow addition of user-defined "virtual" vector graphics when finding tables.
* Confirm that the enveloping bboxes of vector graphics are inside the clip rectangle.
* Avoid slow finding of rectangle intersections.
* Added `Font.bbox` property.
**Changes in version 1.23.18 (2024-01-23)**
* Bug fixes:
* **Fixed** `3081 <https://github.com/pymupdf/PyMuPDF/issues/3081>`_: doc.close() not closing the document
* Other:
* Reduced size of sdist to fit on pypi.org (by reducing size of two test files).
* Fix `Annot.file_info()` if no `Desc` item.
**Changes in version 1.23.17 (2024-01-22)**
* Bug fixes:
* **Fixed** `3062 <https://github.com/pymupdf/PyMuPDF/issues/3062>`_: page_rotation_reset does not return page to original rotation
* **Fixed** `3070 <https://github.com/pymupdf/PyMuPDF/issues/3070>`_: update_link(): AttributeError: 'Page' object has no attribute 'super'
* Other:
* Fixed bug in `Page.links()` (PR #3075).
* Fixed bug in `Page.get_bboxlog()` with layers.
* Add support for timeouts in scripts/ and tests/run_compound.py.
**Changes in version 1.23.16 (2024-01-18)**
* Bug fixes:
* **Fixed** `3058 <https://github.com/pymupdf/PyMuPDF/issues/3058>`_: Pixmap created from CMYK JPEG delivers RGB format
* Other:
* In table detection strategy "lines_strict", exclude fill-only vector graphics.
* Fixed sysinstall test failure.
* In documentation, update feature matrix with item about text writing.
**Changes in version 1.23.15 (2024-01-16)**
* Bug fixes:
* **Fixed** `3050 <https://github.com/pymupdf/PyMuPDF/issues/3050>`_: python3.9 pix.set_pixel has something wrong in c.append( ord(i))
* Other:
* Improved docs for Page.find_tables().
**Changes in version 1.23.14 (2024-01-15)**
* Bug fixes:
* **Fixed** `3038 <https://github.com/pymupdf/PyMuPDF/issues/3038>`_: JM_pixmap_from_display_list > Assertion Error : Checking for wrong type
* **Fixed** `3039 <https://github.com/pymupdf/PyMuPDF/issues/3039>`_: Issue with doc.close() not closing the document in PyMuPDF
* Other:
* Ensure valid "re" rectangles in `Page.get_drawings()` with derotated pages.
**Changes in version 1.23.13 (2024-01-15)**
* Bug fixes:
* **Fixed** `2979 <https://github.com/pymupdf/PyMuPDF/issues/2979>`_: list index out of range in to_pandas()
* **Fixed** `3001 <https://github.com/pymupdf/PyMuPDF/issues/3001>`_: Calling find_tables() on one document alters the bounding boxes of a subsequent document
* Other:
* Fixed `Rect.height` and `Rect.width` to never return negative values.
* Fixed `TextPage.extractIMGINFO()`'s returned `dictkey_yres` value.
**Changes in version 1.23.12 (2024-01-12)**
* * **Fixed** `3027 <https://github.com/pymupdf/PyMuPDF/issues/3027>`_: Page.get_text throws Attribute Error for 'parent'
**Changes in version 1.23.11 (2024-01-12)**
* Fixed some Pixmap construction bugs.
* Fixed Pixmap.yres().
**Changes in version 1.23.10 (2024-01-12)**
* Bug fixes:
* **Fixed** `3020 <https://github.com/pymupdf/PyMuPDF/issues/3020>`_: Can't resize a PixMap
* Other:
* Fixed Page.delete_image().
**Changes in version 1.23.9 (2024-01-11)**
* Default to new "rebased" implementation.
* The old "classic" implementation is available with `import fitz_old as fitz`.
* For more information about why we are changing to the rebased implementation,
see: https://github.com/pymupdf/PyMuPDF/discussions/2680
* Use MuPDF-1.23.9.
* Bug fixes (rebased implementation only):
* **Fixed** `2911 <https://github.com/pymupdf/PyMuPDF/issues/2911>`_: Page.derotation_matrix returns a tuple instead of a Matrix with rebased implementation
* **Fixed** `2919 <https://github.com/pymupdf/PyMuPDF/issues/2919>`_: Rebased version: KeyError in resolve_names when merging pdfs
* **Fixed** `2922 <https://github.com/pymupdf/PyMuPDF/issues/2922>`_: New feature that allows inserting named-destination links doesn't work
* **Fixed** `2943 <https://github.com/pymupdf/PyMuPDF/issues/2943>`_: ZeroDivisionError: float division by zero when use apply_redactions()
* **Fixed** `2950 <https://github.com/pymupdf/PyMuPDF/issues/2950>`_: Shelling out to pip during tests is problematic
* **Fixed** `2954 <https://github.com/pymupdf/PyMuPDF/issues/2954>`_: Replacement unicode character in text extraction
* **Fixed** `2957 <https://github.com/pymupdf/PyMuPDF/issues/2957>`_: apply_redactions() moving text
* **Fixed** `2961 <https://github.com/pymupdf/PyMuPDF/issues/2961>`_: Passing a string as a page number raises IndexError instead of TypeError.
* **Fixed** `2969 <https://github.com/pymupdf/PyMuPDF/issues/2969>`_: annot.next throws AttributeError
* **Fixed** `2978 <https://github.com/pymupdf/PyMuPDF/issues/2978>`_: 1.23.9rc1: module 'fitz.mupdf' has no attribute 'fz_copy_pixmap_rect'
* **Fixed** `2907 <https://github.com/pymupdf/PyMuPDF/issues/2907>`_: segfault trying to call clean_contents on certain pdfs with python 3.12
* **Fixed** `2905 <https://github.com/pymupdf/PyMuPDF/issues/2905>`_: SystemError: <built-in function TextPage_extractIMGINFO> returned a result with an exception set
* **Fixed** `2742 <https://github.com/pymupdf/PyMuPDF/issues/2742>`_: Segmentation Fault when inserting three (but not two) copies of the same source page into one destination page
* Other:
* Add optional setting of opacity to `Page.insert_htmlbox()`.
* Fixed issue with add_redact_annot() mentioned in #2934.
* Fixed `Page.rotation()` to return 0 for non-PDF documents instead of raising an exception.
* Fixed internal quad detection to cope with any Python sequence.
* Fixed rebased `fitz.pymupdf_version_tuple` - was previously set to mupdf version.
* Improved support for Linux system installs, including adding regular testing on Github.
* Add missing `flake8` to `scripts/gh_release.py:test_packages`.
* Use newly public functions in MuPDF-1.23.8.
* Improved `scripts/test.py` to help investigation of MuPDF issues.
**Changes in version 1.23.8 (2023-12-19)**
* Bug fixes (rebased implementation only):
* **Fixed** `2634 <https://github.com/pymupdf/PyMuPDF/issues/2634>`_: get_toc and set_toc do not behave consistently for rotated pages
* **Fixed** `2861 <https://github.com/pymupdf/PyMuPDF/issues/2861>`_: AttributeError in getLinkDict during PDF Merge
* **Fixed** `2871 <https://github.com/pymupdf/PyMuPDF/issues/2871>`_: KeyError in getLinkDict during PDF merge
* **Fixed** `2886 <https://github.com/pymupdf/PyMuPDF/issues/2886>`_: Error in Skeleton for Named Link Destinations
* Bug fixes (rebased and classic implementations):
* **Fixed** `2885 <https://github.com/pymupdf/PyMuPDF/issues/2885>`_: pymupdf find tables too slow
* Other:
* Rebased implementation:
* `Page.insert_htmlbox()`: new, much more powerful alternative to `Page.insert_textbox()` or `TextWriter.fill_textbox()`, using `Story`.
* `Story.fit*()`: new methods for fitting a Story into an expanded rect.
* `Story.write_with_links()`: add support for external links.
* `Document.language()`: fixed to use MuPDF's new `mupdf.fz_string_from_text_language2()`.
* `Document.subset_fonts()` - fixed.
* Fixed internal `Archive._add_treeitem()` method.
* Fixed `fitz_new.__doc__` to contain PyMuPDF and Python version information, and OS name.
* Removed use of `(*args, **kwargs)` in API, we now specify keyword args explicitly.
* Work with new MuPDF Python exception classes.
* Fixed bug where `button_states()` returns None when `/AP` points to an indirect object.
* Fixed pillow test to not ignore all errors, and install pillow when testing.
* Added test for `fitz.css_for_pymupdf_font()` (uses package `pymupdf-fonts`).
* Simplified Github Actions test specifications.
* Updated `tests/README.md`.
**Changes in version 1.23.7 (2023-11-30)**
* Bug fixes in rebased implementation, not fixed in classic implementation:
* **Fixed** `2232 <https://github.com/pymupdf/PyMuPDF/issues/2232>`_: Geometry helper classes should support keyword arguments
* **Fixed** `2788 <https://github.com/pymupdf/PyMuPDF/issues/2788>`_: Problem with get_toc in pymupdf 1.23.6
* **Fixed** `2791 <https://github.com/pymupdf/PyMuPDF/issues/2791>`_: Experiencing small memory leak in save()
* Bug fixes (rebased and classic implementations):
* **Fixed** `2736 <https://github.com/pymupdf/PyMuPDF/issues/2736>`_: Failure when set cropbox with mediabox negative value
* **Fixed** `2749 <https://github.com/pymupdf/PyMuPDF/issues/2749>`_: RuntimeError: cycle in structure tree
* **Fixed** `2753 <https://github.com/pymupdf/PyMuPDF/issues/2753>`_: Story.write_with_links will ignore everything after the first "page break" in the HTML.
* **Fixed** `2812 <https://github.com/pymupdf/PyMuPDF/issues/2812>`_: find_tables on landscape page generates reversed text
* **Fixed** `2829 <https://github.com/pymupdf/PyMuPDF/issues/2829>`_: [cannot create /Annot for kind] is still printed despite #2345 is closed.
* **Fixed** `2841 <https://github.com/pymupdf/PyMuPDF/issues/2841>`_: Unexpected KeyError when using scrub with fitz_new
* Use MuPDF-1.23.7.
* Other:
* Rebased implementation:
* Added flake8 code checking to test suite, and made various fixes.
* Disable diagnostics during Document constructor to match classic implementation.
* Additional fix to `2553 <https://github.com/pymupdf/PyMuPDF/issues/2553>`_: Invalid characters in versions >= 1.22
* Fixed `MuPDF Bug 707324 <https://bugs.ghostscript.com/show_bug.cgi?id=707324>`_: Story: HTML table row background color repeated incorrectly
* Added `scripts/test.py`, for simple build+test of PyMuPDF git checkout.
* Added `fitz.pymupdf_version_tuple`, e.g. `(1, 23, 6)`.
* Restored mistakenly-reverted fix for `2345 <https://github.com/pymupdf/PyMuPDF/issues/2345>`_: Turn off print statements in utils.py
* Include any trailing `... repeated <N> times...` text in warnings returned by `mupdf_warnings()` (rebased only).
**Changes in version 1.23.6 (2023-11-06)**
* Bug fixes:
* **Fixed** `2553 <https://github.com/pymupdf/PyMuPDF/issues/2553>`_: Invalid characters in versions >= 1.22
* **Fixed** `2608 <https://github.com/pymupdf/PyMuPDF/issues/2608>`_: Incorrect utf32 text extraction (high & low surrogates are split)
* **Fixed** `2710 <https://github.com/pymupdf/PyMuPDF/issues/2710>`_: page.rect and text location wrong / differing from older version
* **Fixed** `2774 <https://github.com/pymupdf/PyMuPDF/issues/2774>`_: wrong encoding for "\?" character when sort=True
* **Fixed** `2775 <https://github.com/pymupdf/PyMuPDF/issues/2775>`_: fitz_new does not work with python3.10 or earlier
* **Fixed** `2777 <https://github.com/pymupdf/PyMuPDF/issues/2777>`_: With fitz_new, wrong type for Page.mediabox
* Other:
* Use MuPDF-1.23.5.
* Added Document.resolve_names() (rebased implementation only).
**Changes in version 1.23.5 (2023-10-11)**
* Bug fixes:
* **Fixed** `2341 <https://github.com/pymupdf/PyMuPDF/issues/2341>`_: Handling negative values in the zoom section for LINK_GOTO in linkDest
* **Fixed** `2522 <https://github.com/pymupdf/PyMuPDF/issues/2522>`_: Typo in set_layer() - NameError: name 'f' is not defined
* **Fixed** `2548 <https://github.com/pymupdf/PyMuPDF/issues/2548>`_: Fitz freezes on some PDFs when calling the fitz.Page.get_text_blocks method.
* **Fixed** `2596 <https://github.com/pymupdf/PyMuPDF/issues/2596>`_: save(garbage=3) breaks get_pixmap() with side effect
* **Fixed** `2635 <https://github.com/pymupdf/PyMuPDF/issues/2635>`_: "clean=True" makes objects invisible in the pdf
* **Fixed** `2637 <https://github.com/pymupdf/PyMuPDF/issues/2637>`_: Page.insert_textbox incorrectly handles the last word if it starts a new line
* **Fixed** `2699 <https://github.com/pymupdf/PyMuPDF/issues/2699>`_: extract paragraph with below table
* **Fixed** `2703 <https://github.com/pymupdf/PyMuPDF/issues/2703>`_: Wrong fontsize calculation in corner cases ("page.get_texttrace()")
* **Fixed** `2710 <https://github.com/pymupdf/PyMuPDF/issues/2710>`_: page.rect and text location wrong / differing from older version
* **Fixed** `2723 <https://github.com/pymupdf/PyMuPDF/issues/2723>`_: When will a Python 3.12 wheel be available?
* **Fixed** `2730 <https://github.com/pymupdf/PyMuPDF/issues/2730>`_: persistent get_text() formatting
* Other:
* Use MuPDF-1.23.4.
* Fix optimisation flags with system installs.
* Fixed the problem that the clip parameter does not take effect during table recognition
* Support Pillow mode "RGBa"
* Support extra word delimiters
* Support checking valid PDF name objects
**Changes in version 1.23.4 (2023-09-26)**
* Improved build instructions.
* Fixed Tesseract in rebased implementation.
* Improvements to build/install with system MuPDF.
* Fixed Pyodide builds.
* Fixed rebased bug in _insert_image().
* Bug fixes:
* **Fixed** `2556 <https://github.com/pymupdf/PyMuPDF/issues/2556>`_: Segmentation fault at caling get_cdrawings(extended=True)
* **Fixed** `2637 <https://github.com/pymupdf/PyMuPDF/issues/2637>`_: Page.insert_textbox incorrectly handles the last word if it starts a new line
* **Fixed** `2683 <https://github.com/pymupdf/PyMuPDF/issues/2683>`_: Windows sdist build failure - non-quoting of path and using UNIX which command
* **Fixed** `2691 <https://github.com/pymupdf/PyMuPDF/issues/2691>`_: Page.get_textpage_ocr() bug in rebased fitz_new version
* **Fixed** `2692 <https://github.com/pymupdf/PyMuPDF/issues/2692>`_: Page.get_pixmap(clip=Rect()) bug in rebased fitz_new version
**Changes in version 1.23.3 (2023-08-31)**
* Fixed use of Tesseract for OCR.
**Changes in version 1.23.2 (2023-08-28)**
* **Fixed** `#2613 <https://github.com/pymupdf/PyMuPDF/issues/2613>`_: release 1.23.0 not MacOS-arm64 compatible
**Changes in version 1.23.1 (2023-08-24)**
* Updated README and package summary description.
*
Fixed a problem on some Linux installations with Python-3.10
(and possibly earlier versions) where `import fitz` failed with
`ImportError: libcrypt.so.2: cannot open shared object file: No such
file or directory`.
*
Fixed `incompatible architecture` error on MacOS arm64.
*
Fixed installation warning from Poetry about missing entry in wheels'
RECORD files.
**Changes in version 1.23.0 (2023-08-22)**
* Add method `find_tables()` to the `Page` object.
This allows locating tables on any supported document page, and
extracting table content by cell.
* New "rebased" implementation of PyMuPDF.
The rebased implementation is available as Python module
`fitz_new`. It can be used as a drop-in replacement with `import
fitz_new as fitz`.
*
Python-independent MuPDF libraries are now in a second wheel called
`PyMuPDFb` that will be automatically installed by pip.
This is to save space on pypi.org - a full release only needs one
`PyMuPDFb` wheel for each OS.
* Bug fixes:
* **Fixed** `#2542 <https://github.com/pymupdf/PyMuPDF/issues/2542>`_: fitz.utils.scrub AttributeError Annot object has no attribute fileUpd inside
* **Fixed** `#2533 <https://github.com/pymupdf/PyMuPDF/issues/2533>`_: get_texttrace returned a incorrect character bbox
* **Fixed** `#2537 <https://github.com/pymupdf/PyMuPDF/issues/2537>`_: Validation when setting a grouped RadioButton throws a RuntimeError: path to 'V' has indirects
* Other changes:
* Dropped support for Python-3.7.
* Fix for wrong page / annot `/Contents` cleaning.
We need to set `pdf_filter_options::no_update` to zero.
* Added new function get_tessdata().
* Cope with problem `/Annot` arrays.
When copying page annotations in method Document.insert_pdf we
previously did not check the validity of members of the `/Annots`
array. For faulty members (like null or non-dictionary items) this
could cause unnecessary exceptions. This fix implements more checks
and skips such array items.
* Additional annotation type checks.
We did not previously check for annotation type when getting /
setting annotation border properties. This is now checked in
accordance with MuPDF.
* Increase fault tolerance.
Avoid exceptions in method `insert_pdf()` when source pages contains
invalid items in the `/Annots` array.
* Return empty border dict for applicable annots.
We previously were returning a non-empty border dictionary even for
non-applicable annotation types. We now return the empty dictionary
`{}` in these cases. This requires some corresponding changes in the
annotation `.update()` method, namely for dashes and border width.
* Restrict `set_rect` to applicable annot types.
We were insufficiently excluding non-applicable annotation types
from `set_rect()` method. We now let MuPDF catch unsupported
annotations and return `False` in these cases.
* Wrong fontsize computation in `page.get_texttrace()`.
When computing the font size we were using the final text
transformation matrix, where we should have taken `span->trm`
instead. This is corrected here.
* Updates to cope with changes to latest MuPDF.
`pdf_lookup_anchor()` has been removed.
* Update fill_textbox to better respect rect.width
The function norm_words in fill_textbox had a bug in its last
loop, appending n+1 characters when actually measuring width of n
characters. It led to a bug in fill_texbox when you tried to write
a single word mostly composed of "wide" letters (M,m, W, w...),
causing the written text to exceed the given rect.
The fix was just to replace n+1 by n.
* Add `script_focus` and `script_blur` options to widget.
**Changes in version 1.22.5 (2023-06-21)**
* This release uses ``MuPDF-1.22.2``.
* Bug fixes:
* **Fixed** `#2365 <https://github.com/pymupdf/PyMuPDF/issues/2365>`_: Incorrect dictionary values for type "fs" drawings.
* **Fixed** `#2391 <https://github.com/pymupdf/PyMuPDF/issues/2391>`_: Check box automatically uncheck when we update same checkbox more than 1 times.
* **Fixed** `#2400 <https://github.com/pymupdf/PyMuPDF/issues/2400>`_: Gaps within text of same line not filled with spaces.
* **Fixed** `#2404 <https://github.com/pymupdf/PyMuPDF/issues/2404>`_: Blacklining an image in PDF won't remove underlying content in version 1.22.X.
* **Fixed** `#2430 <https://github.com/pymupdf/PyMuPDF/issues/2430>`_: Incorrectly reducing ref count of Py_None.
* **Fixed** `#2450 <https://github.com/pymupdf/PyMuPDF/issues/2450>`_: Empty fill color and fill opacity for paths with fill and stroke operations with 1.22.*
* **Fixed** `#2462 <https://github.com/pymupdf/PyMuPDF/issues/2462>`_: Error at "get_drawing(extended=True )"
* **Fixed** `#2468 <https://github.com/pymupdf/PyMuPDF/issues/2468>`_: Decode error when trying to get drawings
* **Fixed** `#2710 <https://github.com/pymupdf/PyMuPDF/issues/2710>`_: page.rect and text location wrong / differing from older version
* **Fixed** `#2723 <https://github.com/pymupdf/PyMuPDF/issues/2723>`_: When will a Python 3.12 wheel be available?
* New features:
* **Changed** Annotations now support "cloudy" borders.
The :attr:`Annot.border` property has the new item `clouds`,
and method :meth:`Annot.set_border` supports the corresponding `clouds` argument.
* **Changed** Radio button widgets in the same RB group
are now consistently updated **if the group is defined in the standard way**.
* **Added** Support for the `/Locked` key in PDF Optional Content.
This array inside the catalog entry `/OCProperties` can now be extracted and set.
* **Added** Support for new parameter `tessdata` in OCR functions.
New function :meth:`get_tessdata` locates the language support folder if Tesseract is installed.
**Changes in version 1.22.3 (2023-05-10)**
* This release uses ``MuPDF-1.22.0``.
* Bug fixes:
* **Fixed** `#2333 <https://github.com/pymupdf/PyMuPDF/issues/2333>`_: Unable to set any of button radio group in form
**Changes in version 1.22.2 (2023-04-26)**
* This release uses ``MuPDF-1.22.0``.
* Bug fixes:
* **Fixed** `#2369 <https://github.com/pymupdf/PyMuPDF/issues/2369>`_: Image extraction bugs with newer versions
**Changes in version 1.22.1 (2023-04-18)**
* This release uses ``MuPDF-1.22.0``.
* Bug fixes:
* **Fixed** `#2345 <https://github.com/pymupdf/PyMuPDF/issues/2345>`_: Turn off print statements in utils.py
* **Fixed** `#2348 <https://github.com/pymupdf/PyMuPDF/issues/2348>`_: extract_image returns an extension "flate" instead of "png"
* **Fixed** `#2350 <https://github.com/pymupdf/PyMuPDF/issues/2350>`_: Can not make widget (checkbox) to read-only by adding flags PDF_FIELD_IS_READ_ONLY
* **Fixed** `#2355 <https://github.com/pymupdf/PyMuPDF/issues/2355>`_: 1.22.0 error when using get_toc (AttributeError: 'SwigPyObject' object has no attribute)
**Changes in version 1.22.0 (2023-04-14)**
* This release uses ``MuPDF-1.22.0``.
* Behavioural changes:
* Text extraction now includes glyphs that overlap with clip rect; previously
they were included only if they were entirely contained within the clip
rect.
* Bug fixes:
* **Fixed** `#1763 <https://github.com/pymupdf/PyMuPDF/issues/1763>`_: Interactive(smartform) form PDF calculation not working in pymupdf
* **Fixed** `#1995 <https://github.com/pymupdf/PyMuPDF/issues/1995>`_: RuntimeError: image is too high for a long paged pdf file when trying
* **Fixed** `#2093 <https://github.com/pymupdf/PyMuPDF/issues/2093>`_: Image in pdf changes color after applying redactions
* **Fixed** `#2108 <https://github.com/pymupdf/PyMuPDF/issues/2108>`_: Redaction removing more text than expected
* **Fixed** `#2141 <https://github.com/pymupdf/PyMuPDF/issues/2141>`_: Failed to read JPX header when trying to get blocks
* **Fixed** `#2144 <https://github.com/pymupdf/PyMuPDF/issues/2144>`_: Replace image throws an error
* **Fixed** `#2146 <https://github.com/pymupdf/PyMuPDF/issues/2146>`_: Wrong Handling of Reference Count of "None" Object
* **Fixed** `#2161 <https://github.com/pymupdf/PyMuPDF/issues/2161>`_: Support adding images as pages directly
* **Fixed** `#2168 <https://github.com/pymupdf/PyMuPDF/issues/2168>`_: ``page.add_highlight_annot(start=pointa, stop=pointb)`` not working
* **Fixed** `#2173 <https://github.com/pymupdf/PyMuPDF/issues/2173>`_: Double free of ``Colorspace`` used in ``Pixmap``
* **Fixed** `#2179 <https://github.com/pymupdf/PyMuPDF/issues/2179>`_: Incorrect documentation for ``pixmap.tint_with()``
* **Fixed** `#2208 <https://github.com/pymupdf/PyMuPDF/issues/2208>`_: Pushbutton widget appears as check box
* **Fixed** `#2210 <https://github.com/pymupdf/PyMuPDF/issues/2210>`_: ``apply_redactions()`` move pdf text to right after redaction
* **Fixed** `#2220 <https://github.com/pymupdf/PyMuPDF/issues/2220>`_: ``Page.delete_image()`` | object has no attribute ``is_image``
* **Fixed** `#2228 <https://github.com/pymupdf/PyMuPDF/issues/2228>`_: open some pdf cost too much time
* **Fixed** `#2238 <https://github.com/pymupdf/PyMuPDF/issues/2238>`_: Bug - can not extract data from file in the newest version 1.21.1
* **Fixed** `#2242 <https://github.com/pymupdf/PyMuPDF/issues/2242>`_: Python quits silently in ``Story.element_positions()`` if callback function prototype is wrong
* **Fixed** `#2246 <https://github.com/pymupdf/PyMuPDF/issues/2246>`_: TextWriter write text in a wrong position
* **Fixed** `#2248 <https://github.com/pymupdf/PyMuPDF/issues/2248>`_: After redacting the content, the position of the remaining text changes
* **Fixed** `#2250 <https://github.com/pymupdf/PyMuPDF/issues/2250>`_: docs: unclear or broken link in page.rst
* **Fixed** `#2251 <https://github.com/pymupdf/PyMuPDF/issues/2251>`_: mupdf_display_errors does not apply to Pixmap when loading broken image
* **Fixed** `#2270 <https://github.com/pymupdf/PyMuPDF/issues/2270>`_: ``Annot.get_text("words")`` - doesn't return the first line of words
* **Fixed** `#2275 <https://github.com/pymupdf/PyMuPDF/issues/2275>`_: insert_image: document that rotations are counterclockwise
* **Fixed** `#2278 <https://github.com/pymupdf/PyMuPDF/issues/2278>`_: Can not make widget (checkbox) to read-only by adding flags PDF_FIELD_IS_READ_ONLY
* **Fixed** `#2290 <https://github.com/pymupdf/PyMuPDF/issues/2290>`_: Different image format/data from Page.get_text("dict") and Fitz.get_page_images()
* **Fixed** `#2293 <https://github.com/pymupdf/PyMuPDF/issues/2293>`_: 68 failed tests when installing from sdist on my box
* **Fixed** `#2300 <https://github.com/pymupdf/PyMuPDF/issues/2300>`_: Too much recursion in tree (parents), makes program terminate
* **Fixed** `#2322 <https://github.com/pymupdf/PyMuPDF/issues/2322>`_: add_highlight_annot using clip generates "A Number is Out of Range" error in PDF
* Other:
* Add key "/AS (Yes)" to the underlying annot object of a selected button form field.
* Remove unused ``Document`` methods ``has_xref_streams()`` and
``has_old_style_xrefs()`` as MuPDF equivalents have been removed.
* Add new ``Document`` methods and properties for getting/setting
``/PageMode``, ``/PageLayout`` and ``/MarkInfo``.
* New ``Document`` property ``version_count``, which contains the number of
incremental saves plus one.
* New ``Document`` property ``is_fast_webaccess`` which tells whether the
document is linearized.
* ``DocumentWriter`` is now a context manager.
* Add support for ``Pixmap`` JPEG output.
* Add support for drawing rectangles with rounded corners.
* ``get_drawings()``: added optional ``extended`` arg.
* Fixed issue where trace devices' state was not being initialised
correctly; data returned from things like ``fitz.Page.get_texttrace()``
might be slightly altered, e.g. ``linewidth`` values.
* Output warning to ``stderr`` if it looks like we are being used with
current directory containing an invalid ``fitz/`` directory, because
this can break import of ``fitz`` module. For example this happens
if one attempts to use ``fitz`` when current directory is a PyMuPDF
checkout.
* Documentation:
* General rework:
* Introduces a new home page and new table of contents.
* Structural update to include new About section.
* Comparison & performance graphing.
* Includes performance methodology in appendix.
* Updates conf.py to understand single back-ticks as code.
* Converts double back-ticks to single back-ticks.
* Removes redundant files.
* Improve ``insert_file()`` documentation.
* ``get_bboxlog()``: aded optional ``layers`` to ``get_bboxlog()``.
* ``Page.get_texttrace()``: add new dictionary key ``layer``, name of Optional Content Group.
* Mention use of Python venv in installation documentation.
* Added missing fix for #2057 to release 1.21.1's changelog.
* Fixes many links to the PyMuPDF-Utilities repo scripts.
* Avoid duplication of ``changes.txt`` and ``docs/changes.rst``.
* Build
* Added ``pyproject.toml`` file to improve builds using pip etc.
**Changes in Version 1.21.1 (2022-12-13)**
* This release uses ``MuPDF-1.21.1``.
* Bug fixes:
* **Fixed** `#2110 <https://github.com/pymupdf/PyMuPDF/issues/2110>`_: Fully embedded font is extracted only partially if it occupies more than one object
* **Fixed** `#2094 <https://github.com/pymupdf/PyMuPDF/issues/2094>`_: Rectangle Detection Logic
* **Fixed** `#2088 <https://github.com/pymupdf/PyMuPDF/issues/2088>`_: Destination point not set for named links in toc
* **Fixed** `#2087 <https://github.com/pymupdf/PyMuPDF/issues/2087>`_: Image with Filter "[/FlateDecode/JPXDecode]" not extracted
* **Fixed** `#2086 <https://github.com/pymupdf/PyMuPDF/issues/2086>`_: Document.save() owner_pw & user_pw has buffer overflow bug
* **Fixed** `#2076 <https://github.com/pymupdf/PyMuPDF/issues/2076>`_: Segfault in fitz.py
* **Fixed** `#2057 <https://github.com/pymupdf/PyMuPDF/issues/2057>`_: Document.save garbage parameter not working in PyMuPDF 1.21.0
* **Fixed** `#2051 <https://github.com/pymupdf/PyMuPDF/issues/2051>`_: Missing DPI Parameter
* **Fixed** `#2048 <https://github.com/pymupdf/PyMuPDF/issues/2048>`_: Invalid size of TextPage and bbox with newest version 1.21.0
* **Fixed** `#2045 <https://github.com/pymupdf/PyMuPDF/issues/2045>`_: SystemError: <built-in function Page_get_texttrace> returned a result with an error set
* **Fixed** `#2039 <https://github.com/pymupdf/PyMuPDF/issues/2039>`_: 1.21.0 fails to build against system libmupdf
* **Fixed** `#2036 <https://github.com/pymupdf/PyMuPDF/issues/2036>`_: Archive::Archive defined twice
* Other
* Swallow "&zoom=nan" in link uri strings.
* Add new Page utility methods ``Page.replace_image()`` and ``Page.delete_image()``.
* Documentation:
* `#2040 <https://github.com/pymupdf/PyMuPDF/issues/2040>`_: Added note about test failure with non-default build of MuPDF, to ``tests/README.md``.
* `#2037 <https://github.com/pymupdf/PyMuPDF/issues/2037>`_: In ``docs/installation.rst``, mention incompatibility with chocolatey.org on Windows.
* `#2061 <https://github.com/pymupdf/PyMuPDF/issues/2061>`_: Fixed description of ``Annot.file_info``.
* `#2065 <https://github.com/pymupdf/PyMuPDF/issues/2065>`_: Show how to insert internal PDF link.
* Improved description of building from source without an sdist.
* Added information about running tests.
* `#2084 <https://github.com/pymupdf/PyMuPDF/issues/2084>`_: Fixed broken link to PyMuPDF-Utilities.
**Changes in Version 1.21.0 (2022-11-8)**
* This release uses ``MuPDF-1.21.0``.
* New feature: Stories.
* Added wheels for Python-3.11.
* Bug fixes:
* **Fixed** `#1701 <https://github.com/pymupdf/PyMuPDF/issues/1701>`_: Broken custom image insertion.
* **Fixed** `#1854 <https://github.com/pymupdf/PyMuPDF/issues/1854>`_: `Document.delete_pages()` declines keyword arguments.
* **Fixed** `#1868 <https://github.com/pymupdf/PyMuPDF/issues/1868>`_: Access Violation Error at `page.apply_redactions()`.
* **Fixed** `#1909 <https://github.com/pymupdf/PyMuPDF/issues/1909>`_: Adding text with `fontname="Helvetica"` can silently fail.
* **Fixed** `#1913 <https://github.com/pymupdf/PyMuPDF/issues/1913>`_: `draw_rect()`: does not respect width if color is not specified.
* **Fixed** `#1917 <https://github.com/pymupdf/PyMuPDF/issues/1917>`_: `subset_fonts()`: make it possible to silence the stdout.
* **Fixed** `#1936 <https://github.com/pymupdf/PyMuPDF/issues/1936>`_: Rectangle detection can be incorrect producing wrong output.
* **Fixed** `#1945 <https://github.com/pymupdf/PyMuPDF/issues/1945>`_: Segmentation fault when saving with `clean=True`.
* **Fixed** `#1965 <https://github.com/pymupdf/PyMuPDF/issues/1965>`_: `pdfocr_save()` Hard Crash.
* **Fixed** `#1971 <https://github.com/pymupdf/PyMuPDF/issues/1971>`_: Segmentation fault when using `get_drawings()`.
* **Fixed** `#1946 <https://github.com/pymupdf/PyMuPDF/issues/1946>`_: `block_no` and `block_type` switched in `get_text()` docs.
* **Fixed** `#2013 <https://github.com/pymupdf/PyMuPDF/issues/2013>`_: AttributeError: 'Widget' object has no attribute '_annot' in delete widget.
* Misc changes to core code:
* Fixed various compiler warnings and a sequence-point bug.
* Added support for Memento builds.
* Fixed leaks detected by Memento in test suite.
* Fixed handling of exceptions in set_name() and set_rect().
* Allow build with latest MuPDF, for regular testing of PyMuPDF master.
* Cope with new MuPDF exceptions when setting rect for some Annot types.
* Reduced cosmetic differences between MuPDF's config.h and PyMuPDF's _config.h.
* Cope with various changes to MuPDF API.
* Other:
* Fixed various broken links and typos in docs.
* Mention install of `swig-python` on MacOS for #875.
* Added (untested) wheels for macos-arm64.
**Changes in Version 1.20.2**
* This release uses ``MuPDF-1.20.3``.
* **Fixed** `#1787 <https://github.com/pymupdf/PyMuPDF/issues/1787>`_.
Fix linking issues on Unix systems.
* **Fixed** `#1824 <https://github.com/pymupdf/PyMuPDF/issues/1824>`_.
SegFault when applying redactions overlapping a transparent image. (Fixed
in ``MuPDF-1.20.3``.)
* Improvements to documentation:
* Improved information about building from source in ``docs/installation.rst``.
* Clarified memory allocation setting ``JM_MEMORY` in ``docs/tools.rst``.
* Fixed link to PDF Reference manual in ``docs/app3.rst``.
* Fixed building of html documentation on OpenBSD.
* Moved old ``docs/faq.rst`` into separate ``docs/recipes-*`` files.
* Removed some unused files and directories:
* ``installation/``
* ``docs/wheelnames.txt``
**Changes in Version 1.20.1**
* **Fixed** `#1724 <https://github.com/pymupdf/PyMuPDF/issues/1724>`_.
Fix for building on FreeBSD.
* **Fixed** `#1771 <https://github.com/pymupdf/PyMuPDF/issues/1771>`_.
`linkDest()` had a broken call to `re.match()`, introduced in 1.20.0.
* **Fixed** `#1751 <https://github.com/pymupdf/PyMuPDF/issues/1751>`_.
`get_drawings()` and `get_cdrawings()` previously always returned with `closePath=False`.
* **Fixed** `#1645 <https://github.com/pymupdf/PyMuPDF/issues/1645>`_.
Default FreeText annotation text color is now black.
* Improvements to sphinx-generated documentation:
* Use readthedocs theme with enhancements.
* Renamed the `.txt` files to have `.rst` suffixes.
------
**Changes in Version 1.20.0**
This release uses ``MuPDF-1.20.0``, released 2022-06-15.