Closed cbm755 closed 1 year ago
Sorry I cannot share this PDF file, but its not a totally healthy file:
$ pdfinfo DELETE_ME_tam_file_with_runtime_annot_errors.pdf
Creator: BaKoMa TeX 11.80 29518P1573/366481723
Producer: Lahore University of Management Sciences (LUMS), Lahore, Pakistan
CreationDate: Wed Jun 7 12:07:10 2023 PDT
Custom Metadata: no
Metadata Stream: no
Tagged: no
UserProperties: no
Suspects: no
Form: AcroForm
Syntax Error: Can't get Fields array<0a>
JavaScript: no
Pages: 24
Encrypted: no
Page size: 612 x 792 pts (letter)
Page rot: 0
File size: 1713255 bytes
Optimized: no
PDF version: 1.4
somewhat surprisingly:
In [10]: doc.is_repaired
Out[10]: False
The first few lines look like this:
%PDF-1.4^M
%¡³Å×^M
1 0 obj^M
[/PDF/Text/ImageB/ImageC]^M
endobj^M
2 0 obj^M
<</AcroForm 174 0 R /Pages 4 0 R /Type/Catalog>>^M
endobj^M
3 0 obj^M
<</CreationDate(D:20230607190710)/Creator(BaKoMa TeX 11.80 29518P1573/366481723)/Producer(Lahore University of Management Sciences \(LUMS\), Lahore, Pakistan)>>^M
endobj^M
4 0 obj^M
<</Count 24/Kids[ 5 0 R 6 0 R 7 0 R 8 0 R 9 0 R 10 0 R 11 0 R 12 0 R 13 0 R 14 0 R 15 0 R 16 0 R 17 0 R 18 0 R 19 0 R 20 0 R 21 0 R 22 0 R 23 0 R 24 0 R 25 0 R 26 0 R 27 0 R 28 0 R ]/MediaBox[ 0 0 612 792]/Type/Pages>>^M
endobj^M
5 0 obj^M
<</Annots[ 176 0 R 178 0 R 181 0 R 183 0 R 185 0 R 187 0 R 189 0 R 191 0 R 193 0 R 195 0 R 198 0 R 200 0 R 201 0 R 203 0 R 205 0 R ]/Contents 34 0 R /Parent 4 0 R /ProcSet 1 0 R /Resources 29 0 R /Type/Page>>^M
endobj^M
6 0 obj^M
<</Annots[ 207 0 R ]/Contents 46 0 R /Parent 4 0 R /ProcSet 1 0 R /Resources 36 0 R /Type/Page>>^M
endobj^M
7 0 obj^M
<</Annots[ 222 0 R ]/Contents 49 0 R /Parent 4 0 R /ProcSet 1 0 R /Resources 48 0 R /Type/Page>>^M
endobj^M
8 0 obj^M
<</Annots[ 224 0 R 2335 0 R ]/Contents 52 0 R /Parent 4 0 R /ProcSet 1 0 R /Resources 51 0 R /Type/Page>>^M
endobj^M
9 0 obj^M
And there are many more <</Annots
but I'm nervous about posting content.
Let me know if you need any other info from the file...
That's a lot of posts. There is no bug, and I think I can address what seems surprising at first sight. Please let me transfer this to "Discussions" to have more room for details.
I'm not sure what the expected behaviour is, but I'm getting a ValueError from
.annots()
:I don't get the error if I send types:
I also don't get the error if reference a page directly:
I can't think why
p.annots()
would be different thandoc[0].annots()
...