Open mulla028 opened 3 weeks ago
@Lucas-C
I have written yesterday a test for --layout
feature, but wasn't sure if you need it. According to your recent feedback in Issue #63, I found that you would like to see some tests. Eventually, I just pushed it 😆
Closes #64
Overview
This PR introduces an optional
--layout
parameter to theup2
command, allowing users to arrange PDF pages in configurable grid layouts. Supported layouts include:If
--layout
is not specified, the command defaults to the original behavior, ensuring full backward compatibility.Changes
up2.py
:up2_main
function to manage both default behavior and specified layouts.mediabox
for compatibility with recent versions ofpypdf
.main
function for backward compatibility, though future calls should useup2_main
.cli.py
:up2
command to callup2_main
with an optional--layout
parameter for layout configurations.Testing
To test each layout configuration, run the following commands: