hyperlinks have negative height

Author: bentsiCreated Mar 22, 2023Updated Jul 27, 2026
Labelsbug

Describe the bug

hyperlink height property has negative height value.

Code to reproduce the problem

  1. open pdf
  2. see pdf_file.pages[61].hyperlinks

PDF file

https://www.singtel.com/content/dam/singtel/about-us/sustainability/reports/Singtel-Group-Sustainability-Report-2022.pdf

Expected behavior

height should be positive number

Actual behavior

height has negative value

Screenshots

image

Environment

  • pdfplumber version: 0.7.5
  • Python version: 3.10.5
  • OS: Ubuntu 20.04.5 LTS (Focal Fossa)

Additional context

in addition we can see that "top" and "bottom" attributes are swapped, that doesn't comply with pdfplumber's bounding box definitions as discussed in https://github.com/jsvine/pdfplumber/issues/198