This commit is contained in:
John Whitington
2022-05-18 17:47:31 +01:00
parent 15bee681ae
commit 0ea7d45506
20 changed files with 813 additions and 1153 deletions

View File

@@ -1,91 +1,54 @@
/* CHAPTER 18. Miscellaneous */
//CHAPTER 18. Miscellaneous
/** Removes images on the given pages, replacing them with crossed boxes if
<code>boxes</code> is <code>true</code>.
@param pdf PDF document
@param range page range
@param boxes add crossed boxes */
public native void draft(Pdf pdf, Range range, boolean boxes)
throws CpdfError;
'boxes' is true. */
function draft(pdf, range, boxes)
/** Removes all text from the given pages in a given document. */
public native void removeAllText(Pdf pdf, Range range) throws CpdfError;
function removeAllText(pdf, range)
/** Blackens all text on the given pages. */
public native void blackText(Pdf pdf, Range range) throws CpdfError;
/* Blackens all text on the given pages. */
function blackText(pdf, range)
/** Blackens all lines on the given pages. */
public native void blackLines(Pdf pdf, Range range) throws CpdfError;
function blackLines(pdf, range)
/** Blackens all fills on the given pages. */
public native void blackFills(Pdf pdf, Range range) throws CpdfError;
function blackFills(pdf, range)
/** Thickens every line less than <code>min_thickness</code> to
<code>min_thickness</code>. Thickness given in points.
@param pdf PDF document
@param range page range
@param min_thickness minimum thickness */
public native void thinLines(Pdf pdf, Range range, double min_thickness)
throws CpdfError;
/** Thickens every line less than min_thickness to min_thickness. Thickness
given in points. */
function thinLines(pdf, range, min_thickness)
/** Copies the <code>/ID</code> from one document to another.
@param pdf PDF document to copy from
@param pdf2 PDF document to copy to */
public native void copyId(Pdf pdf, Pdf pdf2) throws CpdfError;
/** Copies the /ID from one document to another. */
function copyId(pdf_from, pdf_to)
/** Removes a document's <code>/ID</code>. */
public native void removeId(Pdf pdf) throws CpdfError;
/** Removes a document's /ID. */
function removeId(pdf)
/** Sets the minor version number of a document.
@param pdf PDF document
@param version minor version number */
public native void setVersion(Pdf pdf, int version) throws CpdfError;
/** Sets the minor version number of a document. */
function setVersion(pdf, version)
/** Sets the full version number of a document.
@param pdf PDF document
@param major major version number
@param minor minor version nuber */
public native void setFullVersion(Pdf pdf, int major, int minor)
throws CpdfError;
/** Sets the full version number of a document. */
function setFullVersion(pdf, major, minor)
/** Removes any dictionary entry with the given key anywhere in the
document.
@param pdf PDF document
@param key key to remove */
public native void removeDictEntry(Pdf pdf, String key) throws CpdfError;
/** Removes any dictionary entry with the given key anywhere in the document. */
function removeDictEntry(pdf, key)
/** Removes any dictionary entry with the given key whose value matches the
given search term.
@param pdf PDF document
@param key key to remove
@param searchterm search term */
public native void removeDictEntrySearch(Pdf pdf, String key,
String searchterm)
throws CpdfError;
given search term. */
function removeDictEntrySearch(pdf, key, searchterm)
/** Replaces the value associated with the given key.
@param pdf PDF document
@param key key whose value to replace
@param newvalue value to replace with */
public native void replaceDictEntry(Pdf pdf, String key, String newvalue)
throws CpdfError;
/** Replaces the value associated with the given key. */
function replaceDictEntry(pdf, key, newval)
/** Replaces the value associated with the given key if the existing value
matches the search term.
@param pdf PDF document
@param key key whose value to replace
@param newvalue value to replace with
@param searchterm search term */
public native void replaceDictEntrySearch(Pdf pdf, String key,
String newvalue,
String searchterm)
throws CpdfError;
matches the search term. */
function replaceDictEntrySearch(pdf, key, newval, searchterm)
/** Removes all clipping from pages in the given range. */
public native void removeClipping(Pdf pdf, Range range) throws CpdfError;
function removeClipping(pdf, range)
/** Returns a JSON array containing any and all values associated with
the given key, and fills in its length.
@param pdf PDF document
@param key key to search for */
public native byte[] getDictEntries(Pdf pdf, String key) throws CpdfError;
/* Returns a JSON array containing any and all values associated with the
given key, and fills in its length. */
function getDictEntries(pdf, key)