小智 5
0)必要时安装LaTeX
1)在下面的乳胶文档中替换x.pdf为您的file.pdf
\documentclass{article}
\RequirePackage[a4paper,top=3cm,left=3cm,right=3cm,bottom=3cm]{geometry}
\usepackage{pdfpages}
\usepackage{fancyhdr}
\begin{document}
\fancyfoot[RO]{Braga}
\fancyfoot[LO]{2015}
\fancyfoot[CO]{===}
\fancyhead[LO]{Lecture notes of askubuntu}
\fancyhead[RO]{\thepage}
\includepdf[pagecommand={\thispagestyle{empty}},pages=1 ]{x.pdf}
\includepdf[pagecommand={\thispagestyle{fancy}},pages=2-]{x.pdf}
\end{document}
Run Code Online (Sandbox Code Playgroud)
3)运行并创建pdflatex addfooter.tex一个。addfooter.pdf
4) 调整页眉、页脚(左、中、右)、调整边距大小等。
更新:
尽管 LaTeX 版本让我们对细节有更多的控制,正如 @steeldriver 指出的,在某些情况下命令pdfjam行是最好的选择。典型用途:
pdfjam --outfile newfile.pdf --pagecommand '{}' oldfile.pdf
Run Code Online (Sandbox Code Playgroud)