I know the question is a bit silly but hey it's worth it. Usually, when exporting files with datatables in R and Shiny it's quite easy but today I would like to be able to export all the content of a div which contains for example paragraphs, html tables and etc... without however losing the CSS, is it possible to do this with R and Shiny?
library(shiny)
#UI
ui = fluidPage(
downloadButton("download", "Print as pdf"),
fluidRow(
box(width = 12,id="PS1AGLOBAL",dataTableOutput("table_pse1aglobal"),title="",
collapsible = T,
fluidRow(
column(10, #wellPanel(p("Column width 8"))),
column(2,tags$p(style="position: relative; top: -15px;", "PSE 1A global"))),
fluidRow(
column(8, tags$p(style="text-decoration: underline; text-transform: capitalize; font-size: 20px; font-weight: bold; letter-spacing: 2px;", "DECLARATION")
),
column(4)
),
fluidRow(
uiOutput("generated_declaration")
),
)
#SERVER
server <- function(input, output, session) {
downloadHandler(
filename = function () {
#i don't know
}
)
}
shinyApp(ui, server)
I don't know if I have posed my problem correctly, but I just want to export the content of the div with the id "table_pse1aglobal" in a pdf file when a button is clicked. I am open to any suggestions thank you.