diff --git a/cpdfcommand.ml b/cpdfcommand.ml index b68edf9..326f3ae 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -4064,6 +4064,8 @@ let go () = | Some ScaleToFit -> let pdf = get_single_pdf args.op false in let range = parse_pagespec_allow_empty pdf (get_pagespec ()) in + warn_prerotate range pdf; + let pdf = if args.prerotate then prerotate range pdf else pdf in let xylist = Cpdfcoord.parse_coordinates pdf args.coord and scale = args.scale in write_pdf false (Cpdfpage.scale_to_fit_pdf ~fast:args.fast args.position scale xylist args.op pdf range) diff --git a/cpdfmanual.pdf b/cpdfmanual.pdf index 859ee06..40a6999 100644 Binary files a/cpdfmanual.pdf and b/cpdfmanual.pdf differ diff --git a/cpdfmanual.tex b/cpdfmanual.tex index 7c24c80..8d392de 100644 --- a/cpdfmanual.tex +++ b/cpdfmanual.tex @@ -1337,7 +1337,7 @@ The encryption parameters described in Chapter \ref{encryption} may be added to \vspace{1.5mm} \small\noindent\verb!cpdf -scale-to-fit " " [-fast]!\\ - \noindent\verb! [-scale-to-fit-scale ]!\\ + \noindent\verb! [-scale-to-fit-scale ] [-prerotate]!\\ \noindent\verb! in.pdf [] -o out.pdf! \vspace{1.5mm} @@ -1454,7 +1454,7 @@ Y factors given. This scales both the page contents, and the page size itself. I \noindent Scale a file's pages to fit A4 portrait, scaling the page 90\% of its possible size. \end{framed} -\noindent NB: \texttt{-scale-to-fit} operates with respect to the media box not the crop box. If necessary, set the media box to be equal to the crop box first. In addition, \texttt{-scale-to-fit} presently requires that the origin of the media box be (0, 0). This can be assured by preprocessing with \texttt{-upright} (described elsewhere in this chapter). +\noindent NB: \texttt{-scale-to-fit} operates with respect to the media box not the crop box. If necessary, set the media box to be equal to the crop box first. In addition, \texttt{-scale-to-fit} presently requires that the origin of the media box be (0, 0). This can be assured by preprocessing with \texttt{-upright} (described elsewhere in this chapter) or by adding the \texttt{-prerotate} option to the command. The \texttt{-scale-contents} operation scales the contents about the center of the crop box (or, if absent, the media box), leaving the page dimensions