Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

DEV: Remove page labels PR link from message #2561

Merged
merged 1 commit into from
Mar 30, 2024
Merged

Conversation

stefan6419846
Copy link
Collaborator

Maintaining/validating example images inside a PR is complicated. Rather use the existing issue #2560 if there are new findings.

Maintaining/validating example images inside a PR is complicated. Rather use the existing issue #2560 if there are new findings.
Copy link

codecov bot commented Mar 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.72%. Comparing base (7883580) to head (84aefba).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2561   +/-   ##
=======================================
  Coverage   94.72%   94.72%           
=======================================
  Files          50       50           
  Lines        8241     8241           
  Branches     1647     1647           
=======================================
  Hits         7806     7806           
  Misses        267      267           
  Partials      168      168           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pubpub-zz
Copy link
Collaborator

The point is I have not met yet any files with Kids in pagelabels. I would like people to report files if really facing this. I have not understood why the files reported were not good.

I would have proposed to report these cases into new issues

@stefan6419846
Copy link
Collaborator Author

@pubpub-zz Did you verify the links from #1519, especially https://www.bk.admin.ch/dam/bk/de/dokumente/terminologie/publikation_25_jahre_rtd.pdf.download.pdf/Terminologie_Epochen,%20Schwerpunkte,%20Umsetzungen.pdf? It seems to have /Kids like

{'/Kids': [IndirectObject(7333, 0, 140132998195856), IndirectObject(7334, 0, 140132998195856), IndirectObject(7335, 0, 140132998195856), IndirectObject(7336, 0, 140132998195856), IndirectObject(7337, 0, 140132998195856)]}

and just enumerates the page numbers in pypdf, while there should be different names:

ksnip_20240330-101301

The indirect objects point to some /Limits:

{'/Limits': [0, 63], '/Nums': [0, {'/P': 'C1'}, 1, {'/P': 'I'}, 2, {'/P': 'II'}, 3, {'/P': 'III'}, 4, {'/P': 'IV'}, 5, {'/P': 'V'}, 6, {'/P': 'VI'}, 7, {'/P': 'VII'}, 8, {'/P': 'VIII'}, 9, {'/P': 'IX'}, 10, {'/P': 'X'}, 11, {'/P': 'XI'}, 12, {'/P': 'XII'}, 13, {'/P': 'XIII'}, 14, {'/P': 'XIV'}, 15, {'/P': 'XV'}, 16, {'/P': 'XVI'}, 17, {'/P': 'XVII'}, 18, {'/P': '1'}, 19, {'/P': '2'}, 20, {'/P': '3'}, 21, {'/P': '4'}, 22, {'/P': '5'}, 23, {'/P': '6'}, 24, {'/P': '7'}, 25, {'/P': '8'}, 26, {'/P': '9'}, 27, {'/P': '10'}, 28, {'/P': '11'}, 29, {'/P': '12'}, 30, {'/P': '13'}, 31, {'/P': '14'}, 32, {'/P': '15'}, 33, {'/P': '16'}, 34, {'/P': '17'}, 35, {'/P': '18'}, 36, {'/P': '19'}, 37, {'/P': '21'}, 38, {'/P': '22'}, 39, {'/P': '23'}, 40, {'/P': '24'}, 41, {'/P': '25'}, 42, {'/P': '26'}, 43, {'/P': '27'}, 44, {'/P': '28'}, 45, {'/P': '29'}, 46, {'/P': '30'}, 47, {'/P': '31'}, 48, {'/P': '32'}, 49, {'/P': '33'}, 50, {'/P': '34'}, 51, {'/P': '35'}, 52, {'/P': '36'}, 53, {'/P': '37'}, 54, {'/P': '38'}, 55, {'/P': '39'}, 56, {'/P': '40'}, 57, {'/P': '41'}, 58, {'/P': '42'}, 59, {'/P': '43'}, 60, {'/P': '45'}, 61, {'/P': '46'}, 62, {'/P': '47'}, 63, {'/P': '48'}]}
{'/Limits': [64, 127], '/Nums': [64, {'/P': '49'}, 65, {'/P': '50'}, 66, {'/P': '51'}, 67, {'/P': '52'}, 68, {'/P': '53'}, 69, {'/P': '54'}, 70, {'/P': '55'}, 71, {'/P': '56'}, 72, {'/P': '57'}, 73, {'/P': '59'}, 74, {'/P': '60'}, 75, {'/P': '61'}, 76, {'/P': '62'}, 77, {'/P': '63'}, 78, {'/P': '64'}, 79, {'/P': '65'}, 80, {'/P': '66'}, 81, {'/P': '67'}, 82, {'/P': '68'}, 83, {'/P': '69'}, 84, {'/P': '70'}, 85, {'/P': '71'}, 86, {'/P': '72'}, 87, {'/P': '73'}, 88, {'/P': '74'}, 89, {'/P': '75'}, 90, {'/P': '76'}, 91, {'/P': '77'}, 92, {'/P': '78'}, 93, {'/P': '79'}, 94, {'/P': '80'}, 95, {'/P': '81'}, 96, {'/P': '83'}, 97, {'/P': '84'}, 98, {'/P': '85'}, 99, {'/P': '86'}, 100, {'/P': '87'}, 101, {'/P': '88'}, 102, {'/P': '89'}, 103, {'/P': '90'}, 104, {'/P': '91'}, 105, {'/P': '92'}, 106, {'/P': '93'}, 107, {'/P': '95'}, 108, {'/P': '96'}, 109, {'/P': '97'}, 110, {'/P': '98'}, 111, {'/P': '99'}, 112, {'/P': '100'}, 113, {'/P': '101'}, 114, {'/P': '102'}, 115, {'/P': '103'}, 116, {'/P': '104'}, 117, {'/P': '105'}, 118, {'/P': '106'}, 119, {'/P': '107'}, 120, {'/P': '108'}, 121, {'/P': '109'}, 122, {'/P': '110'}, 123, {'/P': '111'}, 124, {'/P': '112'}, 125, {'/P': '113'}, 126, {'/P': '114'}, 127, {'/P': '115'}]}
{'/Limits': [128, 191], '/Nums': [128, {'/P': '117'}, 129, {'/P': '118'}, 130, {'/P': '119'}, 131, {'/P': '120'}, 132, {'/P': '121'}, 133, {'/P': '122'}, 134, {'/P': '123'}, 135, {'/P': '124'}, 136, {'/P': '125'}, 137, {'/P': '126'}, 138, {'/P': '127'}, 139, {'/P': '128'}, 140, {'/P': '129'}, 141, {'/P': '130'}, 142, {'/P': '131'}, 143, {'/P': '132'}, 144, {'/P': '133'}, 145, {'/P': '134'}, 146, {'/P': '135'}, 147, {'/P': '136'}, 148, {'/P': '137'}, 149, {'/P': '138'}, 150, {'/P': '139'}, 151, {'/P': '140'}, 152, {'/P': '141'}, 153, {'/P': '142'}, 154, {'/P': '143'}, 155, {'/P': '144'}, 156, {'/P': '145'}, 157, {'/P': '146'}, 158, {'/P': '147'}, 159, {'/P': '148'}, 160, {'/P': '149'}, 161, {'/P': '150'}, 162, {'/P': '151'}, 163, {'/P': '152'}, 164, {'/P': '153'}, 165, {'/P': '155'}, 166, {'/P': '156'}, 167, {'/P': '157'}, 168, {'/P': '158'}, 169, {'/P': '159'}, 170, {'/P': '160'}, 171, {'/P': '161'}, 172, {'/P': '162'}, 173, {'/P': '163'}, 174, {'/P': '164'}, 175, {'/P': '165'}, 176, {'/P': '167'}, 177, {'/P': '168'}, 178, {'/P': '169'}, 179, {'/P': '170'}, 180, {'/P': '171'}, 181, {'/P': '172'}, 182, {'/P': '173'}, 183, {'/P': '174'}, 184, {'/P': '175'}, 185, {'/P': '176'}, 186, {'/P': '177'}, 187, {'/P': '178'}, 188, {'/P': '179'}, 189, {'/P': '180'}, 190, {'/P': '181'}, 191, {'/P': '182'}]}
{'/Limits': [192, 255], '/Nums': [192, {'/P': '183'}, 193, {'/P': '184'}, 194, {'/P': '185'}, 195, {'/P': '186'}, 196, {'/P': '187'}, 197, {'/P': '188'}, 198, {'/P': '189'}, 199, {'/P': '190'}, 200, {'/P': '191'}, 201, {'/P': '193'}, 202, {'/P': '194'}, 203, {'/P': '195'}, 204, {'/P': '196'}, 205, {'/P': '197'}, 206, {'/P': '198'}, 207, {'/P': '199'}, 208, {'/P': '200'}, 209, {'/P': '201'}, 210, {'/P': '202'}, 211, {'/P': '203'}, 212, {'/P': '204'}, 213, {'/P': '205'}, 214, {'/P': '206'}, 215, {'/P': '207'}, 216, {'/P': '208'}, 217, {'/P': '209'}, 218, {'/P': '210'}, 219, {'/P': '211'}, 220, {'/P': '212'}, 221, {'/P': '213'}, 222, {'/P': '214'}, 223, {'/P': '215'}, 224, {'/P': '216'}, 225, {'/P': '217'}, 226, {'/P': '218'}, 227, {'/P': '219'}, 228, {'/P': '220'}, 229, {'/P': '221'}, 230, {'/P': '222'}, 231, {'/P': '223'}, 232, {'/P': '225'}, 233, {'/P': '226'}, 234, {'/P': '227'}, 235, {'/P': '228'}, 236, {'/P': '229'}, 237, {'/P': '230'}, 238, {'/P': '231'}, 239, {'/P': '232'}, 240, {'/P': '233'}, 241, {'/P': '234'}, 242, {'/P': '235'}, 243, {'/P': '236'}, 244, {'/P': '237'}, 245, {'/P': '238'}, 246, {'/P': '239'}, 247, {'/P': '240'}, 248, {'/P': '241'}, 249, {'/P': '242'}, 250, {'/P': '243'}, 251, {'/P': '244'}, 252, {'/P': '245'}, 253, {'/P': '246'}, 254, {'/P': '247'}, 255, {'/P': '248'}]}
{'/Limits': [256, 289], '/Nums': [256, {'/P': '249'}, 257, {'/P': '251'}, 258, {'/P': '252'}, 259, {'/P': '253'}, 260, {'/P': '254'}, 261, {'/P': '255'}, 262, {'/P': '256'}, 263, {'/P': '257'}, 264, {'/P': '258'}, 265, {'/P': '259'}, 266, {'/P': '260'}, 267, {'/P': '261'}, 268, {'/P': '262'}, 269, {'/P': '263'}, 270, {'/P': '264'}, 271, {'/P': '265'}, 272, {'/P': '266'}, 273, {'/P': '267'}, 274, {'/P': '268'}, 275, {'/P': '269'}, 276, {'/P': '270'}, 277, {'/P': '271'}, 278, {'/P': '272'}, 279, {'/P': '273'}, 280, {'/P': '274'}, 281, {'/P': '275'}, 282, {'/P': '276'}, 283, {'/P': '277'}, 284, {'/P': '278'}, 285, {'/P': '279'}, 286, {'/P': '280'}, 287, {'/P': '281'}, 288, {'/P': '282'}, 289, {'/P': '283'}]}

Copy link
Collaborator

@pubpub-zz pubpub-zz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All good

@pubpub-zz pubpub-zz merged commit a36f9b0 into main Mar 30, 2024
16 checks passed
@pubpub-zz pubpub-zz deleted the page-labels-warning branch March 30, 2024 13:10
stefan6419846 added a commit that referenced this pull request Apr 7, 2024
REL: 4.2.0

## What's new

### New Features (ENH)
- Allow multiple charsets for NameObject.read_from_stream (#2585) by @pubpub-zz
- Add support for /Kids in page labels (#2562) by @stefan6419846
- Allow to update fields on many pages (#2571) by @pubpub-zz
- Tolerate PDF with invalid xref pointed objects (#2335) by @pubpub-zz
- Add Enforce from PDF2.0 in viewer_preferences (#2511) by @pubpub-zz
- Add += and -= operators to ArrayObject (#2510) by @pubpub-zz

### Bug Fixes (BUG)
- Fix merge_page sometimes generating unknown operator 'QQ' (#2588) by @rfotino
- Fix fields update where annotations are kids of field (#2570) by @pubpub-zz
- Process CMYK images without a filter correctly (#2557) by @pubpub-zz
- Extract text in layout mode without finding resources (#2555) by @pubpub-zz
- Prevent recursive loop in some PDF files (#2505) by @pubpub-zz

### Robustness (ROB)
- Tolerate "truncated" xref (#2580) by @pubpub-zz
- Replace error by warning for EOD in RunLengthDecode/ASCIIHexDecode (#2334) by @pubpub-zz
- Rebuild xref table if one entry is invalid (#2528) by @pubpub-zz
- Robustify stream extraction (#2526) by @pubpub-zz

### Documentation (DOC)
- Update release process for latest changes (#2564) by @stefan6419846
- Encryption/decryption: Clone document instead of copying all pages (#2546) by @redfast00
- Minor improvements (#2542) by @j-t-1
- Update annotation list (#2534) by @j-t-1
- Update references and formatting (#2529) by @j-t-1
- Correct threads reference, plus minor changes (#2521) by @j-t-1
- Minor readability increases (#2515) by @j-t-1
- Simplify PaperSize examples (#2504) by @j-t-1
- Minor improvements (#2501) by @j-t-1

### Developer Experience (DEV)
- Remove unused dependencies (#2572) by @stefan6419846
- Remove page labels PR link from message (#2561) by @stefan6419846
- Fix changelog generator regarding whitespace and handling of "Other" group (#2492) by @stefan6419846
- Add REL to known PR prefixes (#2554) by @stefan6419846
- Release using the REL commit instead of git tag (#2500) by @MartinThoma
- Unify code between PdfReader and PdfWriter (#2497) by @pubpub-zz
- Bump softprops/action-gh-release from 1 to 2 (#2514) by @dependabot[bot]

### Maintenance (MAINT)
- Ressources → Resources (and internal name childs) (#2550) by @pubpub-zz
- Fix typos found by codespell (#2549) by @stefan6419846
- Update Read the Docs configuration (#2538) by @j-t-1
- Add root_object, _info and _ID to PdfReader (#2495) by @pubpub-zz

### Testing (TST)
- Allow loading truncated images if required (#2586) by @stefan6419846
- Fix download issues from #2562 (#2578) by @pubpub-zz
- Improve test_get_contents_from_nullobject to show real use-case (#2524) by @stefan6419846
- Add missing test annotations (#2507) by @stefan6419846

[Full Changelog](4.1.0...4.2.0)
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants