diff --git a/chapters/ch03-files.tex b/chapters/ch03-files.tex index 3a28241..f9bc5f2 100644 --- a/chapters/ch03-files.tex +++ b/chapters/ch03-files.tex @@ -71,4 +71,20 @@ find . \( name "*.jpg" -o name "*.jpeg" \) > jpglist.txt Because this is bash, the parentheses are not a capture group\index[concepts]{capture group} (as in regex\index[concepts]{regex}), but operators used to force precedence and need to be escaped, because parentheses are special to the shell. (Normally we would use quotation marks, but because we need to use quotation marks with the \texttt{name} test, we are using backslashes). Likewise, the \texttt{-o} is a Boolean ``or'', meaning that the second expression will not be evaluated if the first one is true. For more information, use \texttt{man find}. -\ktcbox{Sometimes you need a list of files with their filepaths, and these tools will do that. Unfortunately, Linux does not have a way to put the file first, so the way to do this is to redirect \texttt{stdout} to a \texttt{.csv} file and manipulate the output in a spreadsheet.} \ No newline at end of file +\ktcbox{Sometimes you need a list of files with their filepaths, and these tools will do that. Unfortunately, Linux does not have a way to put the file first, so the way to do this is to redirect \texttt{stdout} to a \texttt{.csv} file and manipulate the output in a spreadsheet.} + +\section{To Scale a pdf File} + +\lettrine{S}{ometimes} you need to scale the context of a pdf document.\index[concepts]{pdf documents!scaling} One easy way is to use the \texttt{pdfjam}\index{pdfjam} application, with this command: + +\begin{Verbatim}[frame=single] +pdfjam --outfile output.pdf input.pdf --scale 0.XX +\end{Verbatim} + +This will scale the document by XX percent. Note that this will not change the document size; it merely scales the content. A letter-size document will still be letter-sized, and an A3 document will still be an A3 document.\footnote{For more options (there are lots!) view the manual at \kref{https://github.com/pdfjam/pdfjam}{https://github.com/pdfjam/pdfjam}. For what it's worth, this program is a wrapper for the \LaTeX{} package \texttt{pdfpages}, so if you are handly with LaTeX, you can also accomplish these things that way as well.} + +To reduce both the document size and the content, use the \texttt{--papersize} option. This command will reduce a letter size document (8.5 inches x 11 inches) to a half-letter size document (5.5 inches x 8.5 inches): + +\begin{Verbatim}[frame=single] +pdfjam --outfile output.pdf input.pdf --papersize '{5.5in,8.5in}' +\end{Verbatim} \ No newline at end of file