Giter VIP home page Giter VIP logo

Comments (2)

wz93672 avatar wz93672 commented on May 27, 2024 1

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.

JorjMcKie avatar JorjMcKie commented on May 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.