diff --git a/cpdfcommand.ml b/cpdfcommand.ml index bef00b7..5cbee32 100644 --- a/cpdfcommand.ml +++ b/cpdfcommand.ml @@ -3624,7 +3624,7 @@ let remove_all_text_page pdf p = let resources = p.Pdfpage.resources in let content = p.Pdfpage.content in Cpdf.process_xobjects pdf p remove_all_text_ops; - {p with content = remove_all_text_ops pdf resources content}, pdf + {p with Pdfpage.content = remove_all_text_ops pdf resources content}, pdf let remove_all_text range pdf = let pages = Pdfpage.pages_of_pagetree pdf in diff --git a/cpdfmanual.pdf b/cpdfmanual.pdf index 703dcca..ba502c1 100644 Binary files a/cpdfmanual.pdf and b/cpdfmanual.pdf differ diff --git a/cpdfmanual.tex b/cpdfmanual.tex index 6f5a72f..7abc7c6 100644 --- a/cpdfmanual.tex +++ b/cpdfmanual.tex @@ -101,7 +101,8 @@ verbosity. Under Microsoft Windows, type \texttt{cpdf.exe} instead of \texttt{cp -change-id -l -cpdflin -keep-l -no-preserve-objstm -create-objstm -control -args -utf8 - -stripped -raw -no-embed-font\end{verbatim}\end{framed} + -stripped -raw -no-embed-font + -create-pdf -create-pdf-pages -create-pdf-papersize\end{verbatim}\end{framed} The Coherent PDF tools provide a wide range of facilities for modifying PDF files created by other means. There is a single command-line program @@ -545,6 +546,18 @@ processing. The default is \verb!-stripped!. \section{Font Embedding} Use the \texttt{-no-embed-font} to avoid embedding the Standard 14 Font metrics when adding text with \texttt{-add-text}. +\section{Creating a new PDF} + +Cpdf can build a new PDF file, given a number of pages and a paper size. The default is one page, A4 portrait. + +\begin{framed} + \small\verb?cpdf -create-pdf -create-pdf-pages 20?\\ + \small\verb? -create-pdf-papersize usletter -o out.pdf? +\end{framed} + +The standard paper sizes are listed in Section \ref{papersizes}, or you may specify the width and height directly, as described in the same Chapter. + + \chapter{Merging and Splitting} \begin{framed} \small @@ -734,6 +747,7 @@ The encryption parameters described in Chapter \ref{encryption} may be added to \section{Page Sizes} \index{page size} +\label{papersizes} Any time when a page size is required, instead of writing, for instance \texttt{"210mm 197mm"} one can instead write \texttt{a4portrait}. Here is a list of supported page sizes: {\small