I want to add page numbers at the bottom of each page in a pdf page. The page sizes are different
I left 15pt at the bottom of each page.
The following is my pdf how it looks
I have tried
\documentclass{article}
\usepackage{pdfpages}
\usepackage[footskip = 14mm,showframe]{geometry}
\usepackage{fancyhdr}
\fancyhf{}
\cfoot{\fontsize{20}{20}\selectfont \thepage}
\begin{document}
\eject \pdfpagewidth=432pt \pdfpageheight=179.64pt
\includepdfmerge[fitpaper,pagecommand={\thispagestyle{fancy}}]{/home/simha/latex/test.pdf, 1743}
\eject \pdfpagewidth=432pt \pdfpageheight=71.63999999999999pt
\includepdfmerge[fitpaper,pagecommand={\thispagestyle{fancy}}]{/home/simha/latex/test.pdf, 1744}
\eject \pdfpagewidth=432pt \pdfpageheight=192.12pt
\includepdfmerge[fitpaper,pagecommand={\thispagestyle{fancy}}]{/home/simha/latex/test.pdf, 1745}
\end{document}
What I get is
How to add page number at the bottom when page sizes are different
If all page sizes are same size then the following code works Here my entire document is 432pt, 226pt (W,H). Using footskip=14mm, i can position the pagenumber preciselt where i want.
\batchmode
\documentclass[a4paper,]{article}
\usepackage[
papersize={432pt, 226pt},
footskip = 14mm,
]{geometry}
\usepackage[utf8]{inputenc}
\usepackage{pdfpages}
\usepackage{fancyhdr}
\fancyhf{}
\cfoot{\fontsize{20}{20}\selectfont \thepage}
\begin{document}
\the\textwidth; \the\textheight
\includepdfmerge[pagecommand={\thispagestyle{fancy}}]{/var/tmp/pdfjam-7FXkbO/source-1.pdf,-}
\end{document}
What i get is as below






\thepagehere. I am new to this. – Santhosh Aug 24 '20 at 19:40