Comments (2)
It makes sense. Thank You. I was able to isolate new example with pages I can share, which break file with one save. Iām marking this issue as closed and I will make new one in a minute to separate cases of multiple saves from broken pages.
from pymupdf.
If you repeat saving a document with compression options, please be aware that this first changes the document in memory - before it is saved to disk.
What you seem to detect is that multiple executions of the same duplication detector (garbage=4) in a row may finally run into an error.
As it appears at the moment, the problem only happens under this eccentric programming behavior: why would anyone execute 4 saves in a row with the same options! It is difficult to assign priority to an error which only exhibits under such circumstances.
It seems that you want to achieve the best compression effect when saving. I suggest to use doc.ez_save(filename, garbage=4)
(1 time only). This will do the best duplicates detection in conjunction with optimum compression.
Please try to reproduce the problem when using a reasonable programming style.
from pymupdf.
Related Issues (20)
- subset_fonts error exit without exception/warning HOT 6
- insert_pdf gives TypeError HOT 4
- insert_pdf gives SystemError HOT 6
- Embedded full-text search index HOT 4
- Page.delete_widget() doesn't fully remove the widget, other programs still detect the widgets HOT 14
- regression: fill_textbox: IndexError: pop from empty list HOT 5
- Unable to create a checked radiobutton HOT 1
- draw_rect scaled to very small size HOT 5
- set_toc method error HOT 8
- Marked content sequences in text trace dictionary HOT 3
- 1.24.2/1.24.3: spurious characters introduced when using subset_fonts and insert_pdf HOT 7
- PyMuPDF 1.24.4 causes "segmentation fault" under Python 3.12 and old MAC OS HOT 12
- pixmap.invert_irect(pixmap.irect) take 7 seconds HOT 3
- cygwin x64 pip3 install pymupdf error HOT 2
- When extracting a numbered list, the result is not as expected. HOT 3
- Small size after apply fitz.TOOLS.set_small_glyph_heights(True) HOT 2
- page.get_label() gets wrong label on the first page of doc
- doc.saveIncr() error and doc.close error HOT 2
- Text Color Change for different fonts HOT 1
- get_toc(simple=False) AttributeError: 'Outline' object has no attribute 'rect' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pymupdf.