diegomura / diegomura/react-pdf

Link component is changing the height of the Page

Open
#2,428 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
16.8k
Forks
1.3k
Avg merge
5h 6m
Merged PRs (30d)
52

Description

**Describe the bug**
When rendering a PDF with any Links on it, the height of the page is altered for each Link rendered. If you change the Link component to simply Text, the PDF returns to its normal height.

**To Reproduce**
1. Add any Link component to a PDF
2. Page gets extended slightly (the more links on a page, the more obvious this effect is)

[reproduction](https://react-pdf.org/repl?code=3187b0760ce02e00408a057025803c450298c0bc300500943807c300de0140c300361ac013866002618300a86294037153003d209801dc005b3184d5bb24600398c4c3c00d0c000a00440188c68010c0278418010400b3ea400bc30b007403858c961a73360de529af2035843a94248c00038182961229b4131430248b0c001bbb141230018d0d1185008c97970f0e328302062f1088a8002dad73142082181d43582c1408328802829d0c0011bd2886148b0c584d318f8c000c806981ab0c31543e7528242c00288a01ad54c61ae9400f1af13701d1e9e085ff26f8340c1ef5dd02d83f99c7d7c403303600044a2104395e873a038ea8240690c8e0a39ac00be305b8fd880f0f140100c771e004d45396840c0043b4a0c402751511a4896020b60c1032cb0aa753c866060318c0e001983040b53c19168cc05084005c300023000196530247a8f0007d753c8d8282236129ecbd479649c6e2c000fc2f7d8438ec69814a11ef00aa8d9d4821229db75a54575d4dbb1349e4af411f848fe050004a1803300a0da1d0390aec3c29d10a87416104c440c50800)

**Expected behavior**
PDF document should stay the height provided regardless of whether or not Links are present

**Desktop (please complete the following information):**
- OS: [e.g. MacOS, Windows] MacOS
- Browser [e.g. chrome, safari] Chrome & Safari
- React-pdf version [e.g. v1.1.0] "@react-pdf/renderer": "3.1.12",

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.