py-pdf / py-pdf/pdfly

"cat" command: page range only applies to the last file of wildcard expression

Open
#199 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

subcommand-cat usability
Dominant language
Python
Stars
571
Forks
50
PR merge metrics
No merged PRs in 30d

Description

  • Operating System: Windows 10 Home 22H2
  • Python version: 3.13.8
  • pdfly version used: 0.5.1

Hi,

Suppose there are 3 PDF files in the current folder: 1.pdf, 2.pdf and 3.pdf, and this command is executed:
pdfly.exe cat -o output.pdf *.pdf 0:1.

Actual result: the resulting file, output.pdf, contains full file 1.pdf, full file 2.pdf and the first page of file 3.pdf, i.e. the 0:1 page range is only applied to 3.pdf.

Expected result: output.pdf should contain the first pages of 1.pdf, 2.pdf and 3.pdf, i.e. the range should be applied to all the files of the wildcard expression *.pdf.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing pdfly.exe cat -o output.pdf *.pdf 0:1 with three PDFs, then trace the cat command's argument handling and wildcard expansion. Done means the page range is applied to every file matched by *.pdf; add a regression test covering that command behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.