打印 fancyhdr 和边距规范困难

打印 fancyhdr 和边距规范困难

我正在尝试打印日历,从上到下,从边到边。所以我使用了 fancyhdr 包并设置了所有指定的边距,看起来很棒,但是当我获取 PDF 并使用打印对话框时,事情变得混乱。

我可以选择 -> 适合页面或不适合

但是,因为我想让日历充分利用页面上尽可能多的空间(打印出来后),如果我取消选中“适合页面”选项,内容就会超出页面范围。

我如何打印尽可能大的图像?

\documentclass[landscape,a4paper]{article}
%
\usepackage[utf8]{inputenc} %                                                                          
%
\usepackage[T1]{fontenc}    %   Load a font with all the characters                                  
%
\usepackage{lmodern}        %                                                                   
%

\usepackage{fancyhdr}
\pagestyle{fancy}
\fancypagestyle{nofooter}{%
\fancyfoot{}%
}


\usepackage{color}
\usepackage{calendar} % Use the calendar.sty style

\usepackage[landscape,margin=0.6in,top=0.1in,bmargin=0.01in]{geometry}

\begin{document}

\pagestyle{empty} % Removes the page number from the bottom of the page

\noindent

\StartingDayNumber=1 % Calendar starting day, default of 1 means Sunday, 2 for Monday, etc


\newpage

\begin{center}
\textsc{\Huge Octobre}\\ % Month
\end{center}

%----------------------------------------------------------------------------------------
\noindent
\begin{flushleft}
\begin{calendar}{\hsize}


\setcounter{calendardate}{28} % Start the date counter at 1

 % 1 - Example of content
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\setcounter{calendardate}{1}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}
\day{}{\vspace{3.1cm}}


\setcounter{calendardate}{1}
\day{}{\vspace{2.9cm}}

\finishCalendar
\end{calendar}
\end{flushleft}

对于 calendar.sty

\NeedsTeXFormat{LaTeX2e}

\def\CalendarVersion{3.1}
\def\CalendarVersionDate{2009/04/24}

\ProvidesClass{calendar}[\CalendarVersionDate
       LaTeX2e class file `calendar' v\CalendarVersion]

\typeout{'calendar' style \CalendarVersion \CalendarVersionDate.}
\typeout{Created by Evan Sultanik}
\typeout{****** Bugs/comments/suggestions/technicalities to Evan Sultanik -- [email protected] ******}

\RequirePackage{tabularx}

\def\@CALtrue{1}
\newcount\@currentdaynum
\newcounter{calendardate}
\newcount\StartingDayNumber

\def\dayheader#1#2{
  \noindent
  \begin{minipage}[t]{0.87\hsize}
    \noindent
    \raggedright
    \textit{#1}
  \end{minipage}
  \begin{minipage}[t]{0.1\hsize}
    \noindent
    \raggedleft
    \textit{#2}
  \end{minipage}
}
\def\activities#1{
  \parbox{\hsize}{\vspace*{5pt}\raggedright\scriptsize #1}\smallskip
}

\let\@colbreak=&

\def\printdayname#1{\hfil\textsc{#1}\hfil}

\newcommand{\dayname}[1]{
  \ifnum#1=1 Sunday\else
  \ifnum#1=2 Monday\else
  \ifnum#1=3 Tuesday\else
  \ifnum#1=4 Wednesday\else
     \ifnum#1=5 Thursday\else
  \ifnum#1=6 Friday\else
  \ifnum#1=7 Saturday\else
    \PackageError{calendar}{Unrecognized day number: #1!}
  \fi\fi\fi\fi\fi\fi\fi
}

\StartingDayNumber=1
\newenvironment{calendar}[1]{
  \newdimen\@calendarwidth
  \@calendarwidth=#1
  \begingroup
    \def\@calendarmode{\@CALtrue}
  \def\day##1##2{
  \if\@calendarmode\@CALtrue\else\PackageWarning{calendar}{The '\day' macro is expected to be used in the 'calendar' environment!}\fi
  \ifnum\@currentdaynum>7\global\@currentdaynum=1\fi
  \global\advance\@currentdaynum by 1
  \dayheader{##1}{\thecalendardate}\def\daysep{\vskip1pt\hrule\vskip1pt}
  \activities{##2}
  \addtocounter{calendardate}{1}
  \ifnum\@currentdaynum>7\@arraycr\hline\else&\fi
  }
\def\finishCalendar{
  \ifnum\@currentdaynum=6 &\\\hline\else
  \ifnum\@currentdaynum=5 &&\\\hline\else
  \ifnum\@currentdaynum=4 &&&\\\hline\else
  \ifnum\@currentdaynum=3 &&&&\\\hline\else
  \ifnum\@currentdaynum=2 &&&&&\\\hline\else
  \ifnum\@currentdaynum=1 &&&&&&\\\hline
  \fi\fi\fi\fi\fi\fi
}
  \def\BlankDay{
  \if\@calendarmode\@CALtrue\else\PackageWarning{calendar}{The     '\calendarday' macro is expected to be used in the 'calendar' environment!}\fi
  \ifnum\@currentdaynum>7\global\@currentdaynum=1\fi
  \global\advance\@currentdaynum by 1
  \addtocounter{calendardate}{1}
  \ifnum\@currentdaynum>7\@arraycr\hline\else&\fi
  }

    \setcounter{calendardate}{1}
    \newcount\@currday
    \@currday=\StartingDayNumber
    \newcount\@numdays
    \@numdays=7
    \let\@cbreak=&
    \tabularx{\@calendarwidth}{|X|X|X|X|X|X|X|} \hline

            \ifnum\@currday>\@numdays\@currday=1\fi\printdayname{\dayname{\@currday}}     \global\advance\@currday by 1 &
    \ifnum\@currday>\@numdays\@currday=1\fi\printdayname{\dayname{\@currday}}     \global\advance\@currday by 1 &
    \ifnum\@currday>\@numdays\@currday=1\fi\printdayname{\dayname{\@currday}}     \global\advance\@currday by 1 &
    \ifnum\@currday>\@numdays\@currday=1\fi\printdayname{\dayname{\@currday}} \global\advance\@currday by 1 &
    \ifnum\@currday>\@numdays\@currday=1\fi\printdayname{\dayname{\@currday}} \global\advance\@currday by 1 &
    \ifnum\@currday>\@numdays\@currday=1\fi\printdayname{\dayname{\@currday}} \global\advance\@currday by 1 &
   \ifnum\@currday>\@numdays\@currday=1\fi\printdayname{\dayname{\@currday}}     \global\advance\@currday by 1 \\ \hline \hline
      \@currentdaynum=1
      \let\@firstline=\@CALtrue
}{
    \endtabularx
  \endgroup
}

这就是我想要的,在 Overleaf.com 上查看预览时也看到了这一点

我想要的是乳胶 这是我在不使用“适合页面”选项的情况下尝试打印时得到的结果。

我在打印机对话框中看到的内容

谢谢

相关内容