This commit is contained in:
John Whitington 2022-01-23 13:14:24 +00:00
parent 0f52366328
commit cda631fd7c
5 changed files with 75 additions and 74 deletions

Binary file not shown.

View File

@ -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!

View File

@ -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)."""

View File

@ -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."""

57
pysplits/c19.tex Normal file
View File

@ -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"""