react-pdf icon indicating copy to clipboard operation
react-pdf copied to clipboard

Outline not working/not rendering on current main branch

Open kaceycleveland opened this issue 2 years ago • 10 comments

Before you start - checklist

  • [X] I followed instructions in documentation written for my React-PDF version
  • [X] I have checked if this bug is not already reported
  • [X] I have checked if an issue is not listed in Known issues
  • [x] If I have a problem with PDF rendering, I checked if my PDF renders properly in PDF.js demo

Description

I could not seem to get Outline working properly on the project I was working on recently so I pulled down and realized it is not working on the test environment that is set up in this repo.

For the test repo, the Outline code is included however nothing is outputted by it. I did not investigate much further then this though. You can see under class Test__container_content_toc it is empty.

In addition, having a better idea of what I am looking for when using Outline would be nice. I am not sure exactly what to look for since I could not find a reference picture to see what the UI should look like. My first thought was it was hidden somewhere off screen but like I said, it looks like it does not render at all.

Steps to reproduce

  1. Checkout current code
  2. Run the test code
  3. Upload a document
  4. See that Test__container_content_toc is empty in the DOM.

Expected behavior

TOC renders on the side I assume.

Actual behavior

TOC does not render.

Additional information

No response

Environment

  • Browser (if applicable): Chrome 97.0.4692.71
  • React-PDF version: 5.6.0
  • React version: 17.0.0
  • Webpack version (if applicable): 5.20.0

kaceycleveland avatar Jan 21 '22 17:01 kaceycleveland

I have the same problem here :(

benyamynbrkyc avatar Feb 20 '22 15:02 benyamynbrkyc

Same. onLoadSuccess returns null. Otherwise the PDF page loads fine. I'm trying to use this recipe.

stgermaniac avatar Feb 25 '22 22:02 stgermaniac

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

github-actions[bot] avatar May 30 '22 00:05 github-actions[bot]

Same. onLoadSuccess returns null, <Outline /> render nothing

da-du avatar May 31 '22 09:05 da-du

Same. onLoadSuccess returns null, <Outline /> render nothing

已经找到问题了,pdf 文件需要设置目录,然后 Outline 就渲染出来了

da-du avatar May 31 '22 10:05 da-du

Hi! Same problem here. Does this issue in the queue for the fix?

Legionses avatar Aug 23 '22 11:08 Legionses

@yumanfeng1994 Hi, how

Same. onLoadSuccess returns null, <Outline /> render nothing

已经找到问题了,pdf 文件需要设置目录,然后 Outline 就渲染出来了

Hi! You said the file 'needs to set directory', how u did this?

Legionses avatar Aug 23 '22 11:08 Legionses

Outline works just fine in test repo: https://projects.wojtekmaj.pl/react-pdf/test/

obraz

wojtekmaj avatar Aug 23 '22 11:08 wojtekmaj

@wojtekmaj is Outline adds by default in test repo or i should turn it somewhere? Because I tested 3 pdf files and didn`t see Outline with each of them.

Legionses avatar Aug 23 '22 12:08 Legionses

You add Outline manually just like you add Page components manually.

wojtekmaj avatar Aug 23 '22 14:08 wojtekmaj

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this issue will be closed in 14 days.

github-actions[bot] avatar Nov 28 '22 00:11 github-actions[bot]

This issue was closed because it has been stalled for 14 days with no activity.

github-actions[bot] avatar Dec 12 '22 00:12 github-actions[bot]

@wojtekmaj This should be reopened as Outline is still not rendering anything in the DOM. react-pdf version: 7.5.1

croraf avatar Nov 19 '23 08:11 croraf