Attach (recommended) or Link to PDF file here:
https://www.canada.ca/content/dam/ircc/migration/ircc/english/pdf/kits/forms/eimm5669e.pdf
[eimm5669e.pdf](https://github.com/mozilla/pdf.js/files/7225677/eimm5669e.2.pdf)

Configuration:
- Web browser and its version: Firefox nightly
- Operating system and its version: Linux Debian

Steps to reproduce the problem:
1. Look at the bottom of page 2

if (!node || !node.border) {
    return { w: 0, h: 0 };
  }
  const borderExtra = node.border[$getExtra]();
  if (!borderExtra) {
    return { w: 0, h: 0 };
  }
  return {
    w:
      borderExtra.widths[0] +
      borderExtra.widths[2] +
      borderExtra.insets[0] +
      borderExtra.insets[2],
    h:
      borderExtra.widths[1] +
      borderExtra.widths[3] +
      borderExtra.insets[1] +
      borderExtra.insets[3],
  };
}
function hasMargin(node) {