# Index of values

A
add_artifacts [Cpdftype] | Add artifact markers to any un-marked part of the content stream.
add_bookmark_title [Cpdfbookmarks] | Indent bookmarks in each file by one and add a title bookmark pointing to the first page.
add_bookmarks [Cpdfbookmarks] | `add_bookmarks verify input pdf` adds bookmarks from the bookmark file give.
add_default_fontpack [Cpdfdrawcontrol] |
add_page_labels [Cpdfpagelabels] | Add page labels.
addbezier [Cpdfdrawcontrol] |
addbezier13 [Cpdfdrawcontrol] |
addbezier23 [Cpdfdrawcontrol] |
addbt [Cpdfdrawcontrol] |
addcharspace [Cpdfdrawcontrol] |
addcircle [Cpdfdrawcontrol] |
addet [Cpdfdrawcontrol] |
addimage [Cpdfdrawcontrol] |
addjpeg [Cpdfdrawcontrol] |
addleading [Cpdfdrawcontrol] |
addline [Cpdfdrawcontrol] |
addnamespace [Cpdfdrawcontrol] |
addnewline [Cpdfdrawcontrol] |
addnewpage [Cpdfdrawcontrol] |
addop [Cpdfdrawcontrol] |
addopacity [Cpdfdrawcontrol] |
addpara [Cpdfdrawcontrol] |
addparas [Cpdfdrawcontrol] |
addpng [Cpdfdrawcontrol] |
addrect [Cpdfdrawcontrol] |
addrectangle [Cpdfaddtext] | Add a rectangle to the given pages.
addrendermode [Cpdfdrawcontrol] |
addrise [Cpdfdrawcontrol] |
addsopacity [Cpdfdrawcontrol] |
addspecialtext [Cpdfdrawcontrol] |
addstag [Cpdfdrawcontrol] |
addtag [Cpdfdrawcontrol] |
addtext [Cpdfdrawcontrol] |
addtexts [Cpdfaddtext] | Call `add_texts linewidth outline fast fontname font bates batespad colour position linespacing fontsize underneath text pages orientation relative_to_cropbox midline_adjust topline filename pdf`.
addtextscale [Cpdfdrawcontrol] |
addto [Cpdfdrawcontrol] |
addwordspace [Cpdfdrawcontrol] |
allupright [Cpdfpage] | True if all pages are "upright" i.e no rotation and (0,0)-based.
alluprightonly [Cpdfpage] | True if all pages are "upright" i.e no rotation.
append_page_content [Cpdftweak] | Append page content.
artifact [Cpdfdrawcontrol] |
attach_file [Cpdfattach] | `attach_file keepversion topage pdf filename` attaches the file in `filename` to the pdf, optionally to a page (rather than document-level).
autoartifacts [Cpdfdrawcontrol] |
autotags [Cpdfdrawcontrol] |
B
blackfills [Cpdftweak] | Make all fills on certain pages black.
blacklines [Cpdftweak] | Make all lines on certain pages black.
blacktext [Cpdftweak] | Make all text on certain pages black.
blank_document [Cpdfcreate] | Make a blank document given x and y page dimensions in points and a number of pages
blank_document_paper [Cpdfcreate] | The same, but give a Pdfpaper.t paper size.
bookmarks_open_to_level [Cpdfbookmarks] | Set bookmarks to be open to the given level.
C
calculate_position [Cpdfposition] | `calculate_position ignore_d w (xmin, ymin, xmax, ymax) orientation pos` calculates the absolute position of text given its width, bounding box, orientation and position.
center_to_fit [Cpdfpage] | `center_to_fit : pagesizes pdf range` moves content to the centre of the page without scaling it.
change_bookmark [Cpdfbookmarks] | Alter bookmark destinations given a hash table of (old page reference number, new page reference number) pairings
change_boxes [Cpdfpage] | Change the media box and other known boxes by a function which takes xmin, xmax, ymin, ymax as input.
change_pattern_matrices_page [Cpdfpage] | When a page is transformed, its patterns must be too.
chop [Cpdfchop] | Chop pages in the given range into pieces.
chop_hv [Cpdfchop] | Chop a page in the given range horizontally or vertically.
circle [Cpdfshape] | Calling `circle x y r` builds a path representing a circle at `(x, y)` with radius `r`.
clip [Cpdfdrawcontrol] |
clipevenodd [Cpdfdrawcontrol] |
closepath [Cpdfdrawcontrol] |
cmaps [Cpdftruetype] | Return the list of cmaps from a font file (used for PDF/UA verification).
collate_runs [Cpdfembed] | Collate outputs of `get_char` with like font
colour_op [Cpdfaddtext] | Build a colour operation for filling with the given colour.
colour_op_stroke [Cpdfaddtext] | Build a colour operation for filing with the given colour
colours [Cpdfcolours] | Standard CSS Colours, names in lowercase.
combine_pages [Cpdfpage] | `combine_pages fast under over scaletofit swap equalize` combines the page content of two PDFs, page-by-page.
copy_annotations [Cpdfannot] | Copy the annotations on a given set of pages
copy_box [Cpdfpage] | Copy one box to another in the given pages.
copy_font [Cpdffont] | Copy a font
copy_id [Cpdfmetadata] | `copy_id keepversion copyfrom copyto` copies the ID, if any, from `copyfrom` to `copyto`.
create_metadata [Cpdfmetadata] | Create XMP metadata from scratch
create_pdfua1 [Cpdfua] | Make a blank PDF/UA-1 PDF given a title, paper size, and number of pages.
create_pdfua2 [Cpdfua] | Make a blank PDF/UA-2 PDF given a title, paper size, and number of pages.
crop_pdf [Cpdfpage] | `crop_pdf xywhlist pdf range` sets the cropbox on the given pages.
current_time [Cpdfstrftime] | Get the time now
D
debug_image_processing [Cpdfimage] | Print info when processing image
decompress_pdf [Cpdfsqueeze] | Decompresses all streams in a PDF document, assuming it isn't encrypted.
do_add_artifacts [Cpdfdraw] | When this is set, any untagged material is tagged as an artifact.
draft [Cpdfdraft] | Remove images from a PDF, optionally adding crossed boxes.
draw [Cpdfdraw] | Calling `draw struct_tree fast underneath filename bates batespad range pdf drawops` draws on top of all the pages in the range.
drawops [Cpdfdrawcontrol] |
dummy [Cpdfstrftime] | A dummy time value
dump_attached_files [Cpdfattach] | Dump attached files to a given directory.
E
eltinfo [Cpdfdrawcontrol] |
embed_font [Cpdfdrawcontrol] |
embed_missing_fonts [Cpdffont] | Embed missing fonts
embed_truetype [Cpdfembed] | Build a fontpack from a TrueType font and list of codepoints, embedding its fonts in the document
encode_output [Cpdfmetadata] | Encode a string using a given encoding.
endartifact [Cpdfdrawcontrol] |
endeltinfo [Cpdfdrawcontrol] |
endstag [Cpdfdrawcontrol] |
endtag [Cpdfdrawcontrol] |
endxobj [Cpdfdrawcontrol] |
error [Cpdferror] | Raise SoftError with the given string.
expand_date [Cpdfmetadata] | Expands the date `"now"` to the date now.
extract_fontfile [Cpdffont] | Extract a font file to disk.
extract_images [Cpdfimage] | Extract images.
extract_page_text [Cpdfextracttext] | Extract page text for a given page.
extract_struct_tree [Cpdfua] | Extract structure tree to JSON
extract_text [Cpdfextracttext] | Extract page text for given page range.
F
fill [Cpdfdrawcontrol] |
fillevenodd [Cpdfdrawcontrol] |
find_obj [Cpdftweak] | Find an object from an objspec.
font_widths [Cpdftype] | Return the font width table for a given (id, font, fontsize) combination.
fontpack_initialised [Cpdfdrawcontrol] |
fontpack_of_standardfont [Cpdfembed] | Build a fontpack for a Standard 14 font
G
get_annotations [Cpdfannot] | Return the annotations as a simple old-style (pagenumber, content) list.
get_annotations_json [Cpdfannot] | Get annotations as JSON
get_bookmarks_json [Cpdfbookmarks] | Get bookmarks in JSON format.
get_char [Cpdfembed] | Look up a unicode codepoint in a font page.
get_dict_entries [Cpdftweak] | Get dictionary entries in JSON format
get_info_utf8 [Cpdfmetadata] | Given a PDF, returns a function which can lookup a given dictionary entry from the /Info dictionary, returning it as a UTF8 string
get_metadata [Cpdfmetadata] | Extract metadata to a `Pdfio.bytes`
get_xmp_info [Cpdfmetadata] | Get XMP information for a given key.
getfontname [Cpdfdrawcontrol] |
getfontsize [Cpdfdrawcontrol] |
getindent [Cpdfdrawcontrol] |
go [Cpdfcommand] | Call the command line tools with the contents of `Sys.argv`
go_withargv [Cpdfcommand] | Call the command line tools with a specialised `argv` of our own
H
hard_box [Cpdfpage] | Clip a page to one of its boxes, or the media box if that box is not present.
hasbox [Cpdfpage] | True if a given page in a PDF has a given box
hflip_pdf [Cpdfpage] | Flip the given pages horizontally
I
image_resolution [Cpdfimage] | Report image resolutions.
image_resolution_json [Cpdfimage] | Report image resolution data in JSON format
images [Cpdfimage] | List images in JSON format
impose [Cpdfimpose] | Imposition.
invert_range [Cpdfpagespec] | Invert a range, given the maximum page number and the range.
iter_pages [Cpdfpage] | Same as `process_pages`, but iterate rather than map.
J
jpeg2000_dimensions [Cpdfjpeg2000] | Return the width and height of a JPEG2000 stream
jpeg_dimensions [Cpdfjpeg] | Return the width and height of a JPEG
json_fonts [Cpdffont] | Return font list in JSON format
json_of_object [Cpdfjson] | Convert a single PDF object to CPDFJSON format.
json_page_info [Cpdfpage] | Return page info for selected pages in JSON format.
K
kappa [Cpdfshape] | The factor by which the radius of a circle is multiplied to find the length of the bezier control lines when approximating quarter arcs to make circles.
L
list_annotations [Cpdfannot] | List the annotations to standard output in a given encoding.
list_attached_files [Cpdfattach] | List attached files.
list_bookmarks [Cpdfbookmarks] | `list_bookmarks encoding range pdf output` lists the bookmarks to the given output in the format specified in cpdfmanual.pdf.
list_fonts [Cpdffont] | Return font list.
list_spot_colours [Cpdfspot] | List spot colours to Standard Output.
load_substitute [Cpdfembed] | Load substitute Standard 14 font
loadttf [Cpdfdrawcontrol] |
loadttfseparate [Cpdfdrawcontrol] |
M
map_pages [Cpdfpage] | Same as `process_pages` but return the list of outputs of the map function.
mark [Cpdfua] | Mark PDF as PDF/UA-1 compliant.
mark2 [Cpdfua] | Mark PDF as PDF/UA-2 compliant.
mark_all_as_artifact [Cpdfpage] | Mark a PDF as begin entirely artifacts (may be used after running `remove_struct_tree`.
missing_fonts [Cpdffont] | Report missing fonts
missing_fonts_return [Cpdffont] | Return missing fonts
N
name_of_spec [Cpdfbookmarks] | `name_of_spec encoding marks pdf splitlevel spec n filename startpage endpage` expands a bookmark specifiation filename.
O
object_of_json [Cpdfjson] | Convert a single CPDFJSON object to a PDF object
ocg_coalesce [Cpdfocg] | Coalesce same-named OCGs resulting from merge.
ocg_get_list [Cpdfocg] | Return list of OCG names.
ocg_list [Cpdfocg] | Print OCG list to Standard Output.
ocg_order_all [Cpdfocg] | Make sure every OCG is in the /Order.
ocg_rename [Cpdfocg] | Rename an OCG.
of_input [Cpdfjson] | Read a CPDFJSON PDF from an input.
output_info [Cpdfmetadata] | Output to standard output general information about a PDF.
output_page_info [Cpdfpage] | Print page info (Mediabox etc) to standard output.
output_xmp_info [Cpdfmetadata] | Output to standard output information from any XMP metadata stream in a PDF.
P
padafter [Cpdfpad] | Put blank pages after the given page numbers
padbefore [Cpdfpad] | Put blank pages before the given page numbers
padmultiple [Cpdfpad] | Pad to a multiple of n pages
parse [Cpdftruetype] | Parse the given TrueType font file.
parse_bookmark_file [Cpdfbookmarks] | `parse_bookmark_file verify pdf input` parses the bookmark file in `input`.
parse_colour [Cpdfdrawcontrol] |
parse_coordinate [Cpdfcoord] | Read a coordinate from a string
parse_coordinates [Cpdfcoord] | Read a list of coordinates from a string
parse_pagespec [Cpdfpagespec] | Parse a (valid) page specification to a page range
parse_pagespec_without_pdf [Cpdfpagespec] | Same, but without a PDF.
parse_rectangle [Cpdfcoord] | Read a single rectangles from a string.
parse_rectangles [Cpdfcoord] | Read a list of rectangles from a string.
parse_single_number [Cpdfcoord] | Read a single number from a string
pop [Cpdfdrawcontrol] |
presentation [Cpdfpresent] | `presentation range t d horizontal inward direction effect_duration pdf` adds a presentation on the pages in `range`.
print_dict_entry [Cpdftweak] | Print a dictionary entry.
print_font_table [Cpdffont] | Print a font table to Standard Output.
print_fonts [Cpdffont] | Print font list to stdout
print_metadata [Cpdfmetadata] | Print metadate to stdout
print_pdf_objs [Cpdfdebug] | Print all the objects from a given PDF to Standard Output.
print_struct_tree [Cpdfua] | Print the structure tree to standard output, graphically.
process [Cpdfimage] | Reprocess images.
process_pages [Cpdfpage] | Given a function from page number and page to page, a document, and a list of page numbers to apply it to, apply the function to all those pages.
push [Cpdfdrawcontrol] |
R
read_png [Cpdfpng] | Read a non-interlaced, non-alpha, non-palette PNG for inclusion in a PDF file.
recompress_pdf [Cpdfsqueeze] | Compresses all streams in the PDF document which are uncompressed, using /FlateDecode, leaving out metadata.
rectangle [Cpdfshape] | Calling `rectangle x y w h` builds a path representing a rectangle with top left `(x, y)`, width `w` and height `h`.
rectify_boxes [Cpdfpage] | Change a page's media box so its minimum x and y are 0, making other operations simpler to think about.
redact [Cpdfpage] | Very basic redaction - the removal of whole pages, optionally trimming the structure tree to remove any content there.
remove_all_text [Cpdfremovetext] | Remove all text from the given pages
remove_annotations [Cpdfannot] | Remove the annotations on given pages.
remove_art_pdf [Cpdfpage] | Remove any art box from the given pages.
remove_attached_files [Cpdfattach] | Remove attached files.
remove_bleed_pdf [Cpdfpage] | Remove any bleed box from the given pages.
remove_clipping [Cpdftweak] | Remove clipping.
remove_cropping_pdf [Cpdfpage] | Remove any cropping from the given pages.
remove_dict_entry [Cpdfutil] | Remove a dictionary entry.
remove_fonts [Cpdffont] | Remove fonts from a document.
remove_mark [Cpdfua] | Remove any PDF/UA-* marker
remove_metadata [Cpdfmetadata] | Remove the metadata from a file
remove_obj [Cpdftweak] | `remove_obj pdf objspec` removes the object described by the object specification.
remove_struct_tree [Cpdfpage] | Remove a structure tree entirely from a file, including unmarking marked content.
remove_trim_pdf [Cpdfpage] | Remove any trim box from the given pages.
remove_unsafe_characters [Cpdfattach] | Remove characters which might not make good filenames from a UTF8 string.
removetext [Cpdfremovetext] | Remove text added by `Cpdfaddtext` from the given pages.
replace_dict_entry [Cpdfutil] | Replace a dictionary entry.
replace_obj [Cpdftweak] | `replace_obj pdf objspec obj` replace the object at `objspec` (which must exist) with `obj`.
replace_stream [Cpdftweak] | `remove_stream pdf objspec filename` replaces the stream at `objspec` with the contents of `filename`.
replace_struct_tree [Cpdfua] | Reapply an edited JSON structure tree to its PDF.
restrict_angle [Cpdfshape] | Calling `restrict_angle s a` restricts an angle `a` to one of those at `s, 2s, 3s...` returning the chosen one.
rolemap [Cpdfdraw] | Set the role map.
rotate_contents [Cpdfpage] | Rotate the contents by the given angle on the given pages.
rotate_pdf [Cpdfpage] | Change rotation to a given value 0, 90, 180, 270 on given pages.
rotate_pdf_by [Cpdfpage] | Rotate clockwise by 0, 90, 180, 270 on given pages.
S
scale_contents [Cpdfpage] | Scale the contents of a page by a given factor centred around a given point in a given range.
scale_pdf [Cpdfpage] | Scale a PDF in sx, sy in the given pages.
scale_to_fit_pdf [Cpdfpage] | `scale_to_fit_pdf fast position input_scale x y op pdf range` scales a page to fit the page size given by (x, y) and by the `input_scale` (e.g 1.0 = scale to fit, 0.9 = scale to fit leaving a border etc.).
setBox [Cpdfpage] | `setBox boxname x y w h pdf range` sets the given box on the given pages.
set_annotations_json [Cpdfannot] | Set annotations from JSON.
set_mediabox [Cpdfpage] | `set_mediabox xywhlist pdf range` sets the media box on the given pages.
set_metadata [Cpdfmetadata] | `set_metadata keepversion filename pdf` sets the XML metadata of a PDF to the contents of `filename`.
set_metadata_date [Cpdfmetadata] | Set the metadata date
set_metadata_from_bytes [Cpdfmetadata] | The same, but the content comes from `bytes`.
set_non_full_screen_page_mode [Cpdfmetadata] | Set the non full screen page mode to the given name (sans slash) e.g UseThumbs
set_open_action [Cpdfmetadata] | Set the open action.
set_page_layout [Cpdfmetadata] | Set the page layout to the given name (sans slash) e.g SinglePage
set_page_mode [Cpdfmetadata] | Set the page mode to the given name (sans slash) e.g UseThumbs
set_pdf_info [Cpdfmetadata] | `set_pdf_info (key, value, version)` sets the entry `key` in the /Info directory, updating the PDF minor version to `version`.
set_version [Cpdfmetadata] | Set the PDF version number
set_viewer_preference [Cpdfmetadata] | `set_pdf_info (key, value, version)` sets the entry `key` in the /ViewerPreferences directory, updating the PDF minor version to `version`.
setcap [Cpdfdrawcontrol] |
setdash [Cpdfdrawcontrol] |
setdrawing [Cpdfdrawcontrol] |
setembedstd14 [Cpdfdrawcontrol] |
setfill [Cpdfdrawcontrol] |
setfontname [Cpdfdrawcontrol] |
setfontsize [Cpdfdrawcontrol] |
setjoin [Cpdfdrawcontrol] |
setmatrix [Cpdfdrawcontrol] |
setmiter [Cpdfdrawcontrol] |
setmrotate [Cpdfdrawcontrol] |
setmscale [Cpdfdrawcontrol] |
setmshearx [Cpdfdrawcontrol] |
setmsheary [Cpdfdrawcontrol] |
setmtranslate [Cpdfdrawcontrol] |
setrolemap [Cpdfdrawcontrol] |
setstroke [Cpdfdrawcontrol] |
setthickness [Cpdfdrawcontrol] |
shift_boxes [Cpdfpage] | Shift a PDF's boxes in x and y (in pts) in the given pages.
shift_pdf [Cpdfpage] | Shift a PDF in x and y (in pts) in the given pages.
show_boxes [Cpdfpage] | Show the page boxes for debug.
show_composition [Cpdfcomposition] | `show_composition filesize json pdf` prints the composition of a document to Standard Output.
show_composition_json_blob [Cpdfcomposition] | `show_composition_json_blob filesize json pdf` returns the composition of a document in JSON format.
size_attached_files [Cpdfattach] | Total size in bytes of all attached files.
squeeze [Cpdfsqueeze] | Squeeze a PDF
stamp [Cpdfpage] | `stamp relative_to_cropbox position topline midline fast scale_to_fit isover range over pdf` stamps the first page of `over` over each page of the PDF.
stamp_as_xobject [Cpdfxobject] | Stamp a PDF as an xobject in another.
startxobj [Cpdfdrawcontrol] |
stretch [Cpdfpage] | `stretch fast pagesizes pdf range` stretches content to fit the given page size without regard to aspect ratio.
strftime [Cpdfstrftime] | Strftime.
string_of_pagespec [Cpdfpagespec] | Return a string for the given range.
string_of_position [Cpdfposition] | Produce a debug string of a `position`
stroke [Cpdfdrawcontrol] |
strokefill [Cpdfdrawcontrol] |
strokefillevenodd [Cpdfdrawcontrol] |
subformat_of_string [Cpdfua] | Parse PDF/UA-1 and PDF/UA-2 to the subformat type.
T
test_matterhorn_json [Cpdfua] | Return JSON results of a matterhorn test ("" = all tests
test_matterhorn_print [Cpdfua] | Print matterhorn test results ("" = all tests)
thinlines [Cpdftweak] | Make all lines in the PDF at least a certain thickness.
to_buffer [Cpdfprinttree] | Print a tree to a buffer.
to_output [Cpdfjson] | Write a PDF in CPDFJSON format.
to_string [Cpdfprinttree] | Print a tree to a string.
to_string [Cpdftype] | Debug printing
trim_marks [Cpdfpage] | Add trim marks.
ttfs [Cpdfdrawcontrol] |
twoup [Cpdfimpose] | The legacy twoup operation does the same, but scales the new sides down so that the media box is unchanged.
twoup_stack [Cpdfimpose] | The legacy twoup_stack operation puts two logical pages on each physical page, rotating them 90 degrees to do so.
typeset [Cpdftexttopdf] | Typeset a text file as a PDF.
typeset [Cpdftype] | `typeset process_struct_tree lmargin rmargin tmargin bmargin papersize pdf contents` builds a list of pages of typset content.
typeset_table_of_contents [Cpdftoc] | Typeset a table of contents and prepend to the document.
U
unicodedata [Cpdfunicodedata] | The unicode data.
unicodedata_source [Cpdfunicodedata] | The source, compressed.
upright [Cpdfpage] | Modify the rotation of the page and its contents to leave the rotation at 0 with the page effectively unaltered.
usexobj [Cpdfdrawcontrol] |
V
validate_pagespec [Cpdfpagespec] | Is a page specification, in theory, valid? This is the most we can find out without supplying a PDF, and thus knowing how many pages there are in it.
vflip_pdf [Cpdfpage] | Flip the given pages vertically
W
width_of_string [Cpdftype] | Calculate the widths of a string given a font width table, and list of char codes
X
xobjbbox [Cpdfdrawcontrol] |