介绍
在插入pdf的时候我们可以使用命令\includegraphics{}
, 这时会把pdf当作图片插入文档中,会接收到关于尺寸的warnings. 如果想将pdf当作页面加入新的文档可以使用命令\includepdf{}
. 使用该命令需要添加宏包pdfpages
.
\includepdf{}用法介绍
\includepdf[⟨key=val⟩]{⟨filename⟩}
- ⟨key=val⟩ { A comma separated list of options using the
⟨key⟩=⟨value⟩ syntax. - ⟨filename⟩ { Filename of the PDF document. (The filename must not contain any blanks!)
key的可用参数有如下:
- pages Selects pages to insert. The argument is a comma separated list, containing page numbers (pages={3,5,6,8}), ranges of page numbers (pages={4-9}) or any combination. To insert empty pages use {}.
E.g.: pages={3,{},8-11,15} will insert page 3, an empty page, and
pages 8, 9, 10, 11, and 15. - nup Puts multiple logical pages onto each sheet of paper. The syntax of this option is: nup=⟨xnup⟩x⟨ynup⟩. Where ⟨xnup⟩ and ⟨ynup⟩ specify the number of logical pages in horizontal and vertical direction, which are arranged on each sheet of paper. (Default: nup=1x1).
- landscape Specifies the format of the sheet of paper, which is rotated by 90 degrees. This does not affect the logical pages, which will not be rotated by the ‘landscape’ option. To rotate the logical pages use the ‘angle’ option (e.g. ‘angle=90’). Either ‘true’ or ‘false’ (or no value, which is equivalent to ‘true’). (Default: landscape=false)
- …
\includepdfmerge{}用法介绍
该命令可以同时插入多个pdf文件。
\includepdfmerge[⟨key=val⟩]{⟨file-page-list⟩}
- ⟨key=val⟩ – A comma separated list of options using the
⟨key⟩=⟨value⟩ syntax. - ⟨file-page-list⟩ – ** ⟨filename⟩[,⟨page spec⟩][,⟨file-page-list⟩] ** A comma separated list of filenames and optional
⟨page spec⟩ specifiers. A ⟨page spec⟩ can be everything
the option pages accepts. Leading and trailing spaces
of items in the list is stripped.
注意这里如果不给赋值就只会插入pdf的第一页,且page不在[]的参数中了。其他参数和\includepdf{}一样。
用例如下:
更多可参考pdfpages的说明文档.