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
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)
Correct answer by Santhosh Yedidi on December 9, 2020
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP