AnswerBun.com

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}
usepackage[automark,headsepline,footsepline]{scrlayer-scrpage}

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

enter image description here

What is want is add 15pt space at the bottom like this
enter image description here

2 Answers

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

enter image description here

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)

enter image description here

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}

enter image description here

Answered by Ulrike Fischer on December 9, 2020

Add your own answers!

Related Questions

Plainnat like bibliography style but order by first name

1  Asked on August 8, 2021 by nathan-explosion

     

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

   

Consecutive figures in a section

0  Asked on August 7, 2021 by abod

 

Why are leader skips seemingly ignored in vsplit?

1  Asked on August 7, 2021 by dan-levin

     

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

         

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP