Page LayoutHeader & Footer at very edge of page (pdf,Komascript)

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
crun
Posts: 1
Joined: Thu Jul 18, 2024 2:11 am

Header & Footer at very edge of page (pdf,Komascript)

Post by crun »

I import a lot of whole PDF pages into the appendix of komascript articles. These can, and do have content over almost the whole page except for 1cm at the page edge.

I need to have the section heading at the very top edge of the page, and the footer at the very bottom edge of the page.

An example is https://www.i2cchip.com/radio/zl1bqe/US ... -Schematic

I have been able to bodge a way to move the section heading to the top, with headheight and topmargin but that moves the footer up the page. FirstFootVPos looked promising, but doesn't work.

- I would like a pagestyle that sets this kind of page up
- for pages that are landscape on screen, I would ideally be able to put the section name/footer on the long edge ie rotated 90 degrees for screen viewing (on a printer it is in the unprintable region anyway)
- \section is inside the includepdf so that the section heading is on the same page
- I don't need any header content, but it might be nice to be able to have header on the same line as the section heading

(part of the reason that this is needed, is that I have not been able to get the cross references in the text to reliably give the correct section number and page number. Thus I need it to be immediately clear whether someone is on the correct page or not from the section heading, as the appendix might have 3 almost identical versions of a schematic, so it is not clear from the content)

Image)
mwe just puts some text on, I have commented out the actual pdf import part that I use.

Code: Select all

\documentclass[a4paper,10pt]{scrartcl}
\usepackage[utf8]{inputenc}

\usepackage{pdfpages}

\usepackage[headsepline=off, footsepline=1pt , manualmark]{scrlayer-scrpage}

%Make a pagestyle for the Landscape, fullpage PDFs
\newpairofpagestyles[scrheadings]{landscapepdfpage}{
  \KOMAoptions{headsepline=off, footsepline=off}
  \ifoot[  ]{\tiny copyright notice }
  \cfoot[pg \thepage] {Page \thepage}
  \ofoot{\small{Rev 1},  \enskip{}\today, \enskip{}}
}

\begin{document}

\appendix  %full pdf pages are in the appendix

%Move the section heading to the very edge of the page
  \setlength{\headheight}{\dimexpr 0cm\relax}
  \setlength{\topmargin}{\dimexpr -2.2cm\relax}
  \setlength{\headsep}{\dimexpr 0cm\relax}
%  \setplength{firstfootvpos}{20cm}

\section{Text only MWE version}
This is some text for an MWE. Remove "section" above and uncomment the code below to use the pdf
Section heading should be right at the edge of the paper
Footer is below - I want it at the very edge of the paper
%\includepdf[pages={1}, landscape,
 %  pagecommand={\thispagestyle{landscapepdfpage} \section{The Schematic Section Heading}} ]
 %  {playpdf.pdf}


\end{document}
Attachments
pdfplay.pdf
Required PDF file to include
(21.87 KiB) Downloaded 335 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
Post Reply