HI,
I tried to show a pdf in an iframe. But it's always opened in the external viewer. How can I change this behaviour?
library(shiny)
ui <- fluidPage(
sidebarLayout(
sidebarPanel(
h5("use case - embed a pdf in the app - embed as a local pdf or from web URL")
),
mainPanel(
tabsetPanel(
# using iframe along with tags() within tab to display pdf with scroll, height and width could be adjusted
tabPanel("Reference", uiOutput("pdfview")),
tabPanel("Summary"),
tabPanel("Plot")
)
))
)
server <- function(input, output) {
output$pdfview <- renderUI({
tags$iframe(style="height:600px; width:100%", src="2558.pdf")
})
}
shinyApp(ui = ui, server = server)
any ideas?
Thanks,
Christian