streamlit-pdf-viewer icon indicating copy to clipboard operation
streamlit-pdf-viewer copied to clipboard

Scroll to specific pages

Open lfoppiano opened this issue 1 year ago • 4 comments

I opened a new issue to discuss what was mentioned in https://github.com/lfoppiano/streamlit-pdf-viewer/issues/22#issuecomment-1934000304.

Is it possible to scroll down a specified page?

One possible use case could be that the user wants to link information extracted from the document with specific pages.

lfoppiano avatar Feb 13 '24 01:02 lfoppiano

In my use case this will be really helpful

Odrec avatar Mar 01 '24 05:03 Odrec

Additionally to this, it would be nice if we can navigate to a specific annotation. I'm using streamlit_pdf_viewer with an llm to ask questions about a set of pdfs and making annotations about the sources for the answers. So I display the sources along with the chat response. But if a user has several PDFs, it's complicated to navigate to all of them and search for the annotations. If there was a way to navigate to where an annotation is (at least the page) in a PDF that would work really nicely.

Odrec avatar Mar 05 '24 13:03 Odrec

https://discuss.streamlit.io/t/how-can-i-use-an-auto-scroll-to-the-bottom-of-the-page/39650/7

lfoppiano avatar Aug 06 '24 21:08 lfoppiano

@Odrec I've released version 0.0.18-dev0 that should implement this feature. Please have a go and let me know if you have feedback.

Please see here, and here for more details.

lfoppiano avatar Aug 18 '24 19:08 lfoppiano

Tested and worked fine for me, waiting for the stable release ;)

ghirardinicola avatar Sep 02 '24 12:09 ghirardinicola