The following added extra space in the bottom of pdf page in the mid of the document with custom page size
I have a pdfpage of size 432pt x 240pt I want to add at the bottom 15pt. SO the page size will be 432pt x 255pt.
\documentclass{article}
\usepackage{pdfpages}
\usepackage{geometry}
\begin{document}
% offset is 7.5pt since the pdf will be centered initially
% templatesize is the most important part here. without templatesize fitpaper will create page size of 432x240
\includepdfmerge[offset=0 7.5,fitpaper,templatesize={432pt}{255pt}]{/home/simha/latex/test.pdf, 497}
\end{document}
So 2 things in includepdfmerge to be done
a) fitpaper, templatesize={432pt}{255pt} (both have to be used together)
b) offset=0 7.5 (since the page is centered after fitpage, we have to push it up 15/2
The output looks like this

If we want to add page numbers then we can use the below
\documentclass{scrartcl} % required for page number
\usepackage{pdfpages}
\usepackage{geometry}
\usepackage[automark,headsepline,footsepline]{scrlayer-scrpage} % required for page numbergin
\begin{document
\newgeometry{layoutwidth = 432pt,layoutheight = 253.56pt,left=0mm,right=0mm,top=0mm, bottom=0mm,footskip=1mm}
\includepdfmerge[offset=0 7.5,fitpaper,templatesize={432pt}{255pt},pagecommand={\thispagestyle{plain}}]{/home/simha/latex/test.pdf, 497}
\end{document}
We will use
\documentclass{scrartcl}
\usepackage[automark,headsepline,footsepline]{scrlayer-scrpage}
with
pagecommand={\thispagestyle{plain}}
But for the above to work we have to add the below
\newgeometry{layoutwidth = 432pt,layoutheight = 255pt,left=0mm,right=0mm,top=0mm, bottom=0mm,footskip=1mm}
Then the output will look like (with both extra space and page numbering)
