diegomura / react-pdf

📄 Create PDF files using React
https://react-pdf.org
MIT License
14.94k stars 1.18k forks source link

Destinations don't work for single page documents in Mac's default PDF viewer #2812

Open simzikov opened 4 months ago

simzikov commented 4 months ago

Document navigation (destinations) don't work for single page documents when using the Mac's default PDF viewer. Instead of scrolling to the linked destination, it always scrolls to the top of the page. Consider this code and the file generated with it:

<Document>
    <Page wrap={false}>
        <Link src="#Test">Link</Link>
        <View style={{ height: 30000 }}></View>
        <Text id="Test">target</Text>
    </Page>
</Document>

bc3a1610-154c-4984-bf13-93a3d92eb770.pdf

To Reproduce

  1. Open the generated PDF with the default Mac's viewer.
  2. Click the anchor link.

Expected behavior It should scroll down to its destination.

Desktop (please complete the following information):

mmoulton commented 2 months ago

I can confirm this is still broken in @react-pdf/renderer@3.4.4