# How to add a extra space in the bottom of each page of a pdf

TeX - LaTeX Asked by Santhosh Yedidi on December 9, 2020

I have a pdf file and want to add 15pt space at the bottom for each page. The pages are of different size

I am trying the following to show the pages.

documentclass{scrartcl}
usepackage{geometry}
usepackage{pdfpages}

begin{document}
includepdfmerge[fitpaper]{/home/simha/latex/test.pdf, 1743}
includepdfmerge[fitpaper]{/home/simha/latex/test.pdf, 1744}
includepdfmerge[fitpaper]{/home/simha/latex/test.pdf, 1745}
end{document}


Now how can i add 15pt at the bottom of each in my above code.

The above code will create the following pdf

What is want is add 15pt space at the bottom like this

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}


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)

Correct answer by Santhosh Yedidi on December 9, 2020

You can use the trim option:

documentclass{scrartcl}
usepackage{pdfpages}
begin{document}
includepdfmerge[fitpaper,trim=0pt -1cm 0pt 0pt]{example-image-duck,1}
end{document}


Answered by Ulrike Fischer on December 9, 2020

## Related Questions

### Undefined control sequence, recently read includegraphics

0  Asked on August 8, 2021

### Plainnat like bibliography style but order by first name

1  Asked on August 8, 2021 by nathan-explosion

### I want to plot horizontal single stacked graphs in grey scale inside each cell of a table. Is there a way of doing it?

0  Asked on August 8, 2021 by latex_newbie

### Wrapping text around a figure (under the hood)

1  Asked on August 8, 2021

### The same left and right labels on every tree node – TikZ

2  Asked on August 7, 2021 by hive7

### usepackage{endfloat} problem

0  Asked on August 7, 2021 by neto333

### plot matrix with arrows describing it

2  Asked on August 7, 2021 by roya

### Suppress “In” within LyX

1  Asked on August 7, 2021 by shaha

### how can I create q bar symbol in math mode just like hbar?

1  Asked on August 7, 2021

### Consecutive figures in a section

0  Asked on August 7, 2021 by abod

### How to use optional arguments of the original commands in a macro?

1  Asked on August 7, 2021

### Why are leader skips seemingly ignored in vsplit?

1  Asked on August 7, 2021 by dan-levin

### How can I put only the left and right lines in red in a command?

2  Asked on August 7, 2021

### plot a surface using a nonrectangular domain

1  Asked on August 7, 2021

### Cyclic colormap in pgfplots for surface (2D) phase plots

1  Asked on August 7, 2021 by crateane

### Assign a colour to a lineload

1  Asked on August 7, 2021 by cialuable

### Change Font for a newcommand (cyrilic)

2  Asked on August 7, 2021

### Framing an equation and equation array (boxed)

0  Asked on August 7, 2021

### tex4ht place maintext and footnote in the same file

1  Asked on August 7, 2021

### Biblatex / Biber with babel ngerman – sentence case not working

1  Asked on August 7, 2021