Inseting a pdf into shiny app

Hi! I'm trying to insert a pdf into a shiny app in a tab. However, instead of displaying the pdf in the tab it opens it in the Adobe Acrobat Reader as soon as I run the app. The pdf I'm trying to display is in the www folder (not inside any other folder) I'm wondering if anybody knows how to fix this problem. Below I attach a simple example.

library(shiny)

ui <- fluidPage(
  
  sidebarLayout( 
  
    sidebarPanel(),
    
    mainPanel( 
  br(),

  tabPanel(title = "Referencias", value = 4,
           tags$iframe(style="height:400px; width:100%; scrolling=yes", 
                       src="fitdistrplus.pdf"))
  )
  )
)


server <- function(input, output, session) {

}

shinyApp(ui = ui, server = server

)

Your app is working as expected - I guess you need to check your browser regarding installed plug-ins.

Thanks ismirsehregal!! I'll chek it out!!

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.