react-pdf
react-pdf copied to clipboard
Outline not working/not rendering on current main branch
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
- Checkout current code
- Run the test code
- Upload a document
- 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
I have the same problem here :(
Same. onLoadSuccess returns null. Otherwise the PDF page loads fine. I'm trying to use this recipe.
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.
Same. onLoadSuccess returns null, <Outline />
render nothing
Same. onLoadSuccess returns null,
<Outline />
render nothing
已经找到问题了,pdf 文件需要设置目录,然后 Outline 就渲染出来了
Hi! Same problem here. Does this issue in the queue for the fix?
@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?
Outline works just fine in test repo: https://projects.wojtekmaj.pl/react-pdf/test/

@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.
You add Outline manually just like you add Page components manually.
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.
This issue was closed because it has been stalled for 14 days with no activity.
@wojtekmaj This should be reopened as Outline is still not rendering anything in the DOM. react-pdf version: 7.5.1