-
-
Notifications
You must be signed in to change notification settings - Fork 579
Closed
Labels
Description
- Your issue is based on the latest commit
v0.6.0 dev
$ pdfcpu version
pdfcpu: v0.6.0 dev
panic: runtime error: slice bounds out of range [:8] with length 1
goroutine 1 [running]:
main.printVersion(0xc0001e1110)
/home/stefan/Local/Go/pkg/mod/github.com/pdfcpu/[email protected]/cmd/pdfcpu/process.go:143 +0x24b
main.commandMap.process(0x44113c?, {0x7fff0e661735, 0x7}, {0x0, 0x0})
/home/stefan/Local/Go/pkg/mod/github.com/pdfcpu/[email protected]/cmd/pdfcpu/cmd.go:143 +0x335
main.main()
/home/stefan/Local/Go/pkg/mod/github.com/pdfcpu/[email protected]/cmd/pdfcpu/main.go:56 +0xa6
stefan@stefan-sb [03:47:52 PM] [~/tmp/cor/pdf]
- State your OS and OS version
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 23.10
Release: 23.10
Codename: mantiUbuntu 23.10c- Bug
Hello Horst, the bug is with the command pdfcpu form list
$ pdfcpu form list t2short-fill-19e.orig2.pdf | grep -i combo
ComboBox │ 349.353.385.437.302 │ form1[0].Page3[0].Head_office[0].Line_016[0].Input_016[0] │ │ │ ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
ComboBox │ 349.353.386.429.293 │ form1[0].Page3[0].Mailing_address[0].Line_026[0].Input_026[0] │ │ │ ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
ComboBox │ 349.353.387.420.285 │ form1[0].Page3[0].Location_books[0].Line_036[0].Input_036[0] │ │ │ ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,The value of the three combo box (page 3) are not reported by pdfcpu when using the PDF https://www.canada.ca/content/dam/cra-arc/formspubs/pbg/t2short/t2short-fill-19e.pdf, neither the combox box options.
$ pdfcpu info ~/Downloads/t2short-fill-19e.pdf
/home/stefan/Downloads/t2short-fill-19e.pdf:
Source: /home/stefan/Downloads/t2short-fill-19e.pdf
PDF version: 1.7
Page count: 4
Page size: 612.00 x 792.00 points
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Title: T2 Short Return (2019 and later tax years)
Author:
Subject:
PDF Producer: Designer 6.3
Content creator: Designer 6.3
Creation date: D:20191212115624-05'00'
Modification date: D:20200108145629-05'00'
Viewer Prefs: DisplayDocTitle = true
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Tagged: Yes
Hybrid: No
Linearized: No
Using XRef streams: Yes
Using object streams: Yes
Watermarked: No
Thumbnails: No
Form: Yes
SignaturesExist: Yes
AppendOnly: Yes
Outlines: No
Names: Yes
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Encrypted: Yes
Permissions:
permission bits: 101100110100 (xB34)
Bit 3: true (print(rev2), print quality(rev>=3))
Bit 4: false (modify other than controlled by bits 6,9,11)
Bit 5: true (extract(rev2), extract other than controlled by bit 10(rev>=3))
Bit 6: true (add or modify annotations)
Bit 9: true (fill in form fields(rev>=3)
Bit 10: true (extract(rev>=3))
Bit 11: false (modify(rev>=3))
Bit 12: true (print high-level(rev>=3))
However, using the provided example english.pdf from pdfcpu website, the values are properly extracted.
Do you have any guidance to debug this issue? I would be happy to contribute with a fix.