magick
包来完成这个任务...library(magick)
files <- list.files(pattern = "\\.pdf") #get pdf filenames
pdfs <- Reduce(c, lapply(files, image_read_pdf)) #read in and combine
montage <- image_montage(pdfs, tile = '2x2', geometry = "x1200") #create pages of 4
image_write(montage, format = "pdf", "pages1234.pdf") #save as single pdf
pdfjam
,https://dev59.com/2WQo5IYBdhLWcg3wXeT5#65021319 - jay.sf