【发布时间】:2023-03-20 08:20:01
【问题描述】:
我在闪亮中的代码如下
DT::renderDataTable({
df()
, rownames=FALSE
,extensions = c('Responsive', 'Buttons')
, options = list(
# dom = 'C<"clear">T<"clear">lfrtip'
# , tableTools=list(sSwfPath = copySWF('www'))
dom = 'Bfrtip'
, buttons = c('pageLength'
, 'colvis'
, 'pdf')
, orientation ='landscape'
, lengthMenu = list(c(6, 12, 18, -1), c('6', '12', '18', 'All'))
, pageLength = 12
)
)
}
})
我想横向下载 pdf。我该怎么做。
根据以下链接:https://datatables.net/reference/button/pdf,我们可以将方向作为横向传递。但是,我做不到。
我尝试了以下方法:
DT::renderDataTable({
df()
, rownames=FALSE
,extensions = c('Responsive', 'Buttons')
, options = list(
# dom = 'C<"clear">T<"clear">lfrtip'
# , tableTools=list(sSwfPath = copySWF('www'))
dom = 'Bfrtip'
, buttons = c('pageLength'
, 'colvis'
, list(extend: 'pdf', orientation='landscape')
, orientation ='landscape'
, lengthMenu = list(c(6, 12, 18, -1), c('6', '12', '18', 'All'))
, pageLength = 12
)
)
}
})
【问题讨论】:
标签: r datatables shiny