Page selector feature

#4
by woofadu - opened

Is there a way to have the current page be an input box to navigate to a specific page without having to press the arrow buttons to navigate through pages - similar to how Chrome does pdf pagination

Hi @woofadu ! This is now possible with the starting_page parameter in version 0.0.8.


import gradio as gr
from gradio_pdf import PDF

with gr.Blocks() as demo:
    pdf = PDF(label="PDF")
    starting_page = gr.Number(value=1, minimum=1)
    starting_page.change(lambda n: PDF(starting_page=n), None, pdf)

demo.launch()

Sign up or log in to comment