-
-
Notifications
You must be signed in to change notification settings - Fork 579
Closed
Labels
Description
Thank you for creating pdfcpu! I have a 1.5 MB PDF file with 317 pages in Korean and I am looking to extract only the first 300 pages. I attempted to do so by installing and running the pdfcpu CLI with the split command, but encountered an error stating "runtime error: index out of range [0] with length 0" regardless of the arguments I used.
Attached to this issue is the PDF file in question, titled "big.pdf". big.pdf I am using macOS 14.5 and have provided the steps to reproduce the issue below. Please let me know if you require any further information.
Steps to Reproduce
$ go install github.com/pdfcpu/pdfcpu/cmd/pdfcpu@latest
$ pdfcpu version
pdfcpu: v0.8.0 dev
commit: ? (?)
base : go1.22.3
config: /Users/wjkoh/Library/Application Support/pdfcpu/config.yml
$ mkdir out
$ pdfcpu split big.pdf out 100
splitting big.pdf to out/...
optimizing...
unexpected panic attack: runtime error: index out of range [0] with length 0
$ pdfcpu val big.pdf
validating(mode=relaxed) big.pdf ...
validation ok