diff --git a/cpdfmanual.pdf b/cpdfmanual.pdf index ecf97b8..b21359a 100644 Binary files a/cpdfmanual.pdf and b/cpdfmanual.pdf differ diff --git a/cpdfmanual.tex b/cpdfmanual.tex index 77a80b9..664b6f1 100644 --- a/cpdfmanual.tex +++ b/cpdfmanual.tex @@ -1,6 +1,6 @@ \documentclass{book} % Edit here to produce cpdfmanual.pdf, cpdflibmanual.pdf, pycpdfmanual.pdf etc. -\usepackage{comment}\excludecomment{cpdflib}\excludecomment{pycpdflib} +\usepackage{comment}\excludecomment{cpdflib}\includecomment{pycpdflib} \usepackage{palatino} \usepackage{listings} \usepackage{microtype} @@ -3266,7 +3266,7 @@ It is not required that \texttt{/Length} entries in CPDFJSON stream dictionaries \end{pycpdflib} \clearpage\pagestyle{empty} -\chapter{Optional Content Groups}\label{chap:16}\pagestyle{fancy}\index{Optional Content Group} +\chapter{Optional Content Groups}\label{chap:16}\pagestyle{fancy}\index{optional content group} {\small\begin{framed} \noindent\verb!cpdf -ocg-list in.pdf! diff --git a/pysplits/c02.tex b/pysplits/c02.tex index e9ec64d..49c75a5 100644 --- a/pysplits/c02.tex +++ b/pysplits/c02.tex @@ -20,25 +20,6 @@ def fromMemoryLazy(data, userpw): """ Load a file from from a byte array and the user password (blank if none), but lazily like fromFileLazy.""" -def blankDocument(w, h, pages): - """ Create a blank document - with pages of the given width (in points), height (in points), and number - of pages.""" - -def textToPDF(w, h, font, fontsize, filename): - """textToPDF(w, h, font, fontsize, filename) typesets a UTF8 text file - ragged right on a page of size w * h in points in the given font and font - size.""" - -def textToPDFPaper(papersize, font, fontsize, filename): - """textToPDF(papersize font, fontsize, filename) typesets a UTF8 text file - ragged right on a page of the given size in the given font and font - size.""" - -def blankDocumentPaper(papersize, pages): - """Create a blank document with pages of the given paper size, and number - of pages. """ - def ptOfCm(i): """Convert a figure in centimetres to points (72 points to 1 inch).""" diff --git a/pysplits/c18.tex b/pysplits/c18.tex index 9ddcc95..8c197b3 100644 --- a/pysplits/c18.tex +++ b/pysplits/c18.tex @@ -1,57 +1,20 @@ -# CHAPTER 17. Miscellaneous +# CHAPTER 17. Creating New PDFs -def draft(pdf, r, boxes): - """Remove images on the given pages, replacing - them with crossed boxes if 'boxes' is True.""" +def blankDocument(w, h, pages): + """ Create a blank document + with pages of the given width (in points), height (in points), and number + of pages.""" -def removeAllText(pdf, r): - """Remove all text from the given pages in a document.""" +def blankDocumentPaper(papersize, pages): + """Create a blank document with pages of the given paper size, and number + of pages. """ -def blackText(pdf, r): - """Blacken all text on the given pages.""" +def textToPDF(w, h, font, fontsize, filename): + """textToPDF(w, h, font, fontsize, filename) typesets a UTF8 text file + ragged right on a page of size w * h in points in the given font and font + size.""" -def blackLines(pdf, r): - """Blacken all lines on the given pages.""" - -def blackFills(pdf, r): - """Blacken all fills on the given pages.""" - -def thinLines(pdf, r, linewidth): - """Thicken every line less than - linewidth to linewidth. Thickness given in points.""" - -def copyId(pdf, pdf2): - """Copy the /ID from one pdf to pdf2.""" - -def removeId(pdf): - """Remove a document's /ID""" - -def setVersion(pdf, version): - """Set the minor version number of a document.""" - -def setFullVersion(pdf, major, minor): - """Set the major and minor version number of - a document.""" - -def removeDictEntry(pdf, key): - """Remove any dictionary entry with the given - key anywhere in the document.""" - -def removeDictEntrySearch(pdf, key, searchterm): - """Remove any dictionary entry with the given - key anywhere in the document, if its value matches the given search term.""" - -def replaceDictEntry(pdf, key, newvalue): - """Replace any dictionary entry with the given - key anywhere in the document using the new value given.""" - -def replaceDictEntrySearch(pdf, key, newvalue, searchterm): - """Replace any dictionary entry with the given key anywhere in the - document, if its value matches the given search term, with the new value - given.""" - -def getDictEntries(pdf, key): - """Return JSON of any dict entries with the given key.""" - -def removeClipping(pdf, r): - """Remove all clipping from pages in the given range""" +def textToPDFPaper(papersize, font, fontsize, filename): + """textToPDF(papersize font, fontsize, filename) typesets a UTF8 text file + ragged right on a page of the given size in the given font and font + size.""" diff --git a/pysplits/c19.tex b/pysplits/c19.tex new file mode 100644 index 0000000..9ddcc95 --- /dev/null +++ b/pysplits/c19.tex @@ -0,0 +1,57 @@ +# CHAPTER 17. Miscellaneous + +def draft(pdf, r, boxes): + """Remove images on the given pages, replacing + them with crossed boxes if 'boxes' is True.""" + +def removeAllText(pdf, r): + """Remove all text from the given pages in a document.""" + +def blackText(pdf, r): + """Blacken all text on the given pages.""" + +def blackLines(pdf, r): + """Blacken all lines on the given pages.""" + +def blackFills(pdf, r): + """Blacken all fills on the given pages.""" + +def thinLines(pdf, r, linewidth): + """Thicken every line less than + linewidth to linewidth. Thickness given in points.""" + +def copyId(pdf, pdf2): + """Copy the /ID from one pdf to pdf2.""" + +def removeId(pdf): + """Remove a document's /ID""" + +def setVersion(pdf, version): + """Set the minor version number of a document.""" + +def setFullVersion(pdf, major, minor): + """Set the major and minor version number of + a document.""" + +def removeDictEntry(pdf, key): + """Remove any dictionary entry with the given + key anywhere in the document.""" + +def removeDictEntrySearch(pdf, key, searchterm): + """Remove any dictionary entry with the given + key anywhere in the document, if its value matches the given search term.""" + +def replaceDictEntry(pdf, key, newvalue): + """Replace any dictionary entry with the given + key anywhere in the document using the new value given.""" + +def replaceDictEntrySearch(pdf, key, newvalue, searchterm): + """Replace any dictionary entry with the given key anywhere in the + document, if its value matches the given search term, with the new value + given.""" + +def getDictEntries(pdf, key): + """Return JSON of any dict entries with the given key.""" + +def removeClipping(pdf, r): + """Remove all clipping from pages in the given range"""