MTGProxyPrinter

View Ticket
Login

View Ticket

Ticket Hash: fae56bc9b847f2c009d2fe965f69540925947370
Title: Keep card order when re-flowing overflowing pages
Status: Closed Type: Feature_Request
Severity: Important Priority: Immediate
Subsystem: Other Resolution: Fixed
Last Modified: 2024-04-11 08:41:31
Version Found In:
User Comments:
thomas added on 2022-12-18 23:14:07:

The refactoring can be done when fixing overflowing pages as part of changing document settings is converted to a document Action.

Algorithm loop outline

  • For each page of same kind, compute (cards_on_page - page_capacity)
    • Take excess from the end, split it into (excess_cards // page_capacity) chunks.
      • Place each chunk with length page_capacity on a new page, filling it completely
      • Take the rest and insert it at the beginning of the next original, compatible page

thomas added on 2024-01-30 08:18:25:

Implemented. Algorithm differs from the proposed one, as that still allowed re-ordering between regular and oversized pages.

The implemented algorithm skips leading empty pages, and then partitions the pages into chunks of (oversized and empty) pages, and (regular and empty) pages, and then re-flows each individual chunk.