@kapital1 wrote:
0
I am working on a simple dashboard using Dash Plotly. On my dashboard, I would like to display a PDF file that is found from my local disc. But I couldn’t find a way to do that.
I was trying by converting the PDF file into an image and displaying it as an image file. But my idea is to preview as the PDF file as it is.
Below shown how I tried to approach it.
html.Div([ dcc.Graph(id='pdf_view') ], style= {'width': '50%', 'display': 'inline-block'})Here is my function to display the PDF on the browser.
def open_pdf (file_path): read_pdf = webbrowser.open_new(file_path) return read_pdfHere is my callback
@app.callback( Output('pdf_view', 'figure'), [Input('first-process', 'value')]) def pdf_viewer(one_process): return open_pdf(pdf_file)Can anyone help me to do this?
Posts: 1
Participants: 1






