[英]How do I set pages = odd pages using pdf_convert() in r
library(pdftools)
sapply(list, function(x)
pdf_convert(x, format = "png", pages = NULL, filenames = NULL, dpi = 300, opw = "", upw = "", verbose = TRUE))
I know that pages = NULL means for all pages.我知道 pages = NULL 意味着所有页面。 I am having trouble how to do only odd pages.
我在如何只做奇数页时遇到了麻烦。 Does anyone know what I should put to do only odd pages?
有谁知道我应该只做奇数页吗? Thank you in advance.
先感谢您。
The pages argument accepts a vector of the page numbers you want. pages 参数接受您想要的页码向量。 You could make a sequence of the odd page numbers with the help of the total available in
pdftools::pdf_info()
.您可以借助
pdftools::pdf_info()
中可用的总数来制作奇数页码序列。
sapply(list, function(x)
pdf_convert(x,
format = "png",
pages = seq(from = 1, to = pdf_info(x)$pages, by = 2),
filenames = NULL,
dpi = 300,
opw = "",
upw = "",
verbose = TRUE))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.