If you've got a large document (500 pages+) in Postscript and want to add page numbers, does anyone know how to do this?
From the menu bar choose Edit > Headers, Footers, Page Numbers > Insert. The Header, Footer, Page Number dialog opens. From the Position menu, choose whether to put the page numbers at the top of the page in the header, or at the bottom of the page in the footer. Check the Page Numbering box to add page numbers.
Select the "Header & Footer" in the Edit PDF Toolbar, and click on the "Add..." option from the drop-down menu. When the Add Header and Footer dialog box appears, place your cursor in the location where you want to insert the page number. Step 3. Then click on the Page Number and Date Format button.
How to add page numbers in a PDF document in Google Docs automatically? If you don't want any specific formatting on your page numbers, then you can choose to add and update them automatically. Here's how: Once your PDF document is converted, click on 'Insert' and select 'Header & page number'.
Based on rcs's proposed solution, I did the following:
Converted the document to example.pdf
and ran pdflatex addpages
, where addpages.tex
reads:
\documentclass[8pt]{article} \usepackage[final]{pdfpages} \usepackage{fancyhdr} \topmargin 70pt \oddsidemargin 70pt \pagestyle{fancy} \rfoot{\Large\thepage} \cfoot{} \renewcommand {\headrulewidth}{0pt} \renewcommand {\footrulewidth}{0pt} \begin{document} \includepdfset{pagecommand=\thispagestyle{fancy}} \includepdf[fitpaper=true,scale=0.98,pages=-]{example.pdf} % fitpaper & scale aren't always necessary - depends on the paper being submitted. \end{document}
or alternatively, for two-sided pages (i.e. with the page number consistently on the outside):
\documentclass[8pt]{book} \usepackage[final]{pdfpages} \usepackage{fancyhdr} \topmargin 70pt \oddsidemargin 150pt \evensidemargin -40pt \pagestyle{fancy} \fancyhead{} \fancyfoot{} \fancyfoot[LE,RO]{\Large\thepage} \renewcommand{\headrulewidth}{0pt} \renewcommand{\footrulewidth}{0pt} \begin{document} \includepdfset{pages=-,pagecommand=\thispagestyle{fancy}} \includepdf{target.pdf} \end{document}
Easy way to change header margins:
% set margins for headers, won't shrink included pdfs % you can remove the topmargin/oddsidemargin/evensidemargin lines \usepackage[margin=1in,includehead,includefoot]{geometry}
you can simply use
pspdftool
in this way:
pspdftool 'number(x=-1pt,y=-1pt,start=1,size=10)' input.pdf output.pdf
see these two examples (unnumbered and numbered pdf with pspdftool)
unnumbered pdf
http://ge.tt/7ctUFfj2
numbered pdf
http://ge.tt/7ctUFfj2
with this as the first command-line argument:
number(start=1, size=40, x=297.5 pt, y=10 pt)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With