(&) [Utility] | let ( & ) a b = a b
|
(*.=) [Utility] |
Operations on floating point references
|
(*=) [Utility] |
Operations on integer references
|
(+.=) [Utility] | |
(+=) [Utility] | |
(-.=) [Utility] | |
(-=) [Utility] | |
(/.=) [Utility] | |
(/=) [Utility] | |
(=::) [Utility] |
Cons something onto the contents of a list reference.
|
(=@) [Utility] |
Append something to the front of the contents of a list reference.
|
(@) [Utility] | |
(@@) [Utility] |
Append with reversed arguments.
|
(|&|) [Utility] |
Exclusive OR
|
A | |
a0 [Paper] | |
a1 [Paper] | |
a2 [Paper] | |
a3 [Paper] | |
a4 [Paper] | |
a5 [Paper] | |
a6 [Paper] | |
a7 [Paper] | |
a8 [Paper] |
ISO A series paper sizes, portrait.
|
add [Utility] | add k v l Adds (k, v) to a dictionary, replacing any existing binding of
k .
|
add_dict_entry [Pdf] |
Add a dictionary entry, replacing if already there.
|
add_pagetree [Pdfdoc] |
Build a page tree from a list of pages and install it in the given PDF
document.
|
add_root [Pdfdoc] |
Given the page root number (for instance that returned by
add_pagetree ),
any specific extra dictionary entries and a PDF document, build a document root.
|
addobj [Pdf] |
Add an object.
|
addobj_given_num [Pdf] |
Same, but pick a number ourselves.
|
align [Io] |
Align on a byte boundary
|
align_write [Io] |
Byte-align.
|
all_but_last [Utility] |
Produce a list containing all but the last element of a list.
|
always [Utility] |
The always-true predicate.
|
append [Transform] | append a b is a transform with the same effect as performing b then a
|
append [Utility] | |
applyn [Utility] |
Apply a function
f n times to initial argument arg .
|
array_iter2 [Utility] | iter2 on arrays.
|
array_map2 [Utility] | map2 on arrays.
|
B | |
between [Utility] |
Find the point equidistant between two others.
|
bitstream_of_input [Io] |
Make a bitstream from an input.
|
blankpage [Pdfdoc] |
Create a page with empty content, media box from the given paper size, empty
resources, zero rotation and no extra dictionary entries.
|
bytestream_of_arraylist [Utility] |
Make a bytestream from a list of integer arrays.
|
bytestream_of_charlist [Utility] |
Make a bytestream from a character list.
|
bytestream_of_input_channel [Io] |
Extract a bytestream from an input or output.
|
bytestream_of_list [Utility] |
Make a bytestream from an integer list.
|
bytestream_of_string [Utility] |
Make a bytestream from a string, no terminator.
|
bytestream_of_write_bitstream [Io] |
Build a bytestream from a write bitstream, padding with zeroes.
|
bytestream_to_output_channel [Io] |
Write a bytestream to an output channel
|
C | |
change_pages [Pdfdoc] |
Change the pages in a document for some new ones.
|
charlist_of_bytestream [Utility] |
Make a character list from a byte stream
|
clear [Utility] |
Set a boolean reference to
false
|
cleave [Utility] | cleave l n splits l into two parts, returned as a tuple.
|
cleavewhile [Utility] |
Same, but split point controlled by a predicate, which is true for elements
in the first returned list.
|
codepoints_of_text [Pdftext] |
Return a list of unicode points from a given extractor and string (for
example from a
Pdfpages.Op_Tj or Op_TJ operator).
|
collate [Utility] |
Collate a list into a list of lists based upon a comparison function by which
it has already been sorted.
|
combine [Utility] | |
combine3 [Utility] | |
compare_i [Utility] |
Monomorphic integer version of
Pervasives.compare
|
compose [Transform] | compose t ts adds operation t to the transform ts .
|
conspair [Utility] |
Consing to each of a pair of lists at the same time.
|
conspairopt [Utility] |
Version where there may or may not be somthing to cons in each case.
|
convert [Units] | convert d u u' produces a convertor converting from unit u to u' with
dpi d
|
copystream [Utility] |
Copy a bytestream.
|
couple [Utility] |
Couple the elements of a list
l using function f .
|
couple_ext [Utility] |
As
couple , but an extra function g is applied to any last (odd) element.
|
couple_reduce [Utility] |
Apply
couple repeatedly until only one element remains.
|
cumulative_sum [Utility] | |
D | |
decode_char [Pdftext] |
Decode a single character code in a standard font
|
decode_pdfstream [Pdfcodec] |
Given a document and stream, decode.
|
decode_pdfstream_onestage [Pdfcodec] |
Given a document and stream decode just one stage.
|
decode_pdfstream_until_unknown [Pdfcodec] |
Given a document and stream decode until there's an unknown decoder.
|
decode_type3_char [Pdftext] |
Decode a single character code in a type3 font to a glyph name
|
decompose [Transform] |
Decompose a transformation matrix to scale, aspect, rotation, shear,
translation in x, translation in y.
|
decrypt_pdf [Pdfcrypt] |
Decrypt a PDF document, given the user password, returning the permissions
under which the document was encrypted.
|
decrypt_pdf_owner [Pdfcrypt] |
Decrypt a PDF document, given the owner password.
|
deg_of_rad [Utility] |
Convert between radians and degrees.
|
dingbatmap [Glyphlist] |
A ZapfDingbats glyph list
|
direct [Pdf] |
Make a PDF object direct -- that is, follow any indirect links.
|
distance_between [Utility] |
Cartesian distance between two points.
|
do_many [Utility] | do_many f n calls f () n times.
|
do_return [Utility] | do_return f g Evaluate f () , evaluate and ignore g () , return f () , in that order.
|
drop [Utility] | drop l n drops n elements from the list raising Invalid_argument if n
< 0 or there are not enough elements.
|
drop' [Utility] |
Same, arguments reversed.
|
drop_evens [Utility] |
Remove the second, fourth etc.
|
drop_odds [Utility] |
Remove the first, third etc.
|
dropwhile [Utility] |
drop elements from a list while a given predicate is true.
|
E | |
empty [Pdf] |
The empty document (PDF 1.0, no objects, no root, empty trailer dictionary.
|
encode_pdfstream [Pdfcodec] |
Encode a PDF stream with an encoding.
|
eq [Utility] |
Equality.
|
eval_function [Pdffun] |
Evaluate a function given a list of inputs.
|
even [Utility] | |
explode [Utility] |
List of characters representing a string.
|
extremes [Utility] |
Find the first and last element of a list.
|
extremes_and_middle [Utility] |
Return the first, middle and last elements of a list which has length at
least two.
|
F | |
fabs [Utility] |
Monomorphic floating-point versions of
Pervasives functions
|
fillstream [Utility] |
Fill a stream with a value
|
firstchar [Utility] |
Return the first character of a string, should it have one.
|
flatten [Utility] | |
flip [Utility] |
Flip a boolean reference
|
flprint [Utility] |
Print a string and flush standard output.
|
fmax [Utility] | |
fmin [Utility] | |
fold_left [Utility] | |
fold_right [Utility] | |
G | |
get_image_24bpp [Pdfimage] |
Given a pdf document, resources dictionary and a stream representing an
image, return a triple : width, height, and a stream of (width * height * 3)
bytes RGBRGB etc.
|
getbit [Io] |
Get a bit
|
getbitint [Io] |
Ditto but as an integer
|
getnum [Pdf] |
Return a float from either a
Real or an Int
|
getstream [Pdf] |
Get a stream from disc if it hasn't already been got.
|
getval_32 [Io] |
Get a 32-bit value
|
glyphmap [Glyphlist] |
The Adobe Glyph List
|
H | |
hashtable_of_dictionary [Utility] |
Build a hashtable from a dictionary (list of key-value pairs).
|
hd [Utility] | |
heads [Utility] |
Return a list of the heads of a list of lists, each of which has at least
one element, preserving order.
|
I | |
i [Transform] |
The identity transform
|
i32add [Utility] | |
i32div [Utility] | |
i32max [Utility] | |
i32min [Utility] | |
i32mul [Utility] | |
i32ofi [Utility] | |
i32pred [Utility] | |
i32sub [Utility] | |
i32succ [Utility] | |
i32tof [Utility] | |
i32toi [Utility] | |
i64add [Utility] | |
i64div [Utility] | |
i64max [Utility] | |
i64min [Utility] | |
i64mul [Utility] | |
i64ofi [Utility] | |
i64pred [Utility] | |
i64sub [Utility] | |
i64succ [Utility] | |
i64toi [Utility] | |
i_matrix [Transform] |
The identity matrix
|
ident [Utility] |
The identity function.
|
ilist [Utility] | ilist 2 5 returns [2; 3; 4; 5] .
|
ilist_fail_null [Utility] | |
ilist_null [Utility] | |
implode [Utility] |
String representing a list of characters.
|
index [Utility] |
Find the position of the first element matching a predicate.
|
indx [Utility] | indx l returns 1; 2; 3 if l has length 3, for example.
|
indx0 [Utility] |
Same, but 0-based.
|
indxn [Utility] |
Same, but n-based.
|
input_of_bytestream [Io] |
Conversion functions.
|
input_of_channel [Io] | |
input_of_stream [Io] | |
int [Utility] |
Same as
Pervasives.int_of_float
|
int_array_of_stream [Utility] |
An integer array of bytes from a stream
|
int_array_of_string [Utility] |
Integer array from a string
|
int_of_rotation [Pdfdoc] |
Utility function to convert from rotation to integers.
|
interleave [Utility] |
Interleave an element among a list, so that
interleave 0 [1; 2; 3]
yields [1; 0; 2; 0; 3] .
|
interleave_lists [Utility] |
Interleave two equal-length lists, taking from the first list first.
|
invert [Utility] |
Invert a vector.
|
isdigit [Utility] |
A character is a decimal digit.
|
isolate [Utility] |
Isolate a central section of a list, from the first element after the element
for which predicate
p is true, to the element before p' is first true.
|
iter [Utility] | |
iter2 [Utility] | |
iter3 [Utility] | |
iter_stream [Pdf] |
Iterate over just the stream objects in a document.
|
J | |
join_write_bitstreams [Io] |
Join several write bitstreams
|
K | |
keep [Utility] | |
L | |
land32 [Utility] | |
landscape [Paper] |
Flip a paper size between landscape and portrait, swapping its dimensions.
|
largest_pow2_divisible [Utility] |
The largest power of two by which a number is exactly divisible.
|
last [Utility] |
Find the last element of a list.
|
lastchar [Utility] |
Return the first character of a string, should it have one.
|
latin1_string_of_text [Pdftext] |
Same, but return Latin1 (Lossy)
|
lcount [Utility] | |
length [Utility] | |
list_of_hashtbl [Utility] |
Make a list of key-value pairs reflecting the contents of a hash table.
|
list_of_q [Utility] | |
list_of_stream [Utility] |
Make a list of the elements of a
Stream.t .
|
log2of [Utility] |
Base two logarithm
|
lookup [Utility] | lookup x l looks up something, returning None if not found.
|
lookup_direct [Pdf] | lookup_direct doc key dict looks up the key returning an option type.
|
lookup_direct_orelse [Pdf] |
Same, but allow alternative key.
|
lookup_exception [Pdf] |
Same, but with customised exception.
|
lookup_fail [Pdf] | lookup_fail errtext doc key dict looks up a key in a PDF dictionary or the
dictionary of a PDF stream.
|
lookup_failnull [Utility] |
Same, but no option type.
|
lookup_obj [Pdf] |
Lookup an object in a document, parsing it if required.
|
lor32 [Utility] | |
lor64 [Utility] | |
lose [Utility] | List.filter has a confusing name, so we define keep and lose to avoid
error.
|
lsl32 [Utility] | |
lsl64 [Utility] | |
lsr32 [Utility] | |
lsr64 [Utility] | |
lxor32 [Utility] | |
M | |
make_matrix [Pdf] |
Build a matrix
pdfobject .
|
make_write_bitstream [Io] |
Return a new write bistream.
|
many [Utility] | many x n makes a list of length n with each element equal to x .
|
manyunique [Utility] |
A version where we need to apply unit each time, for instance when producing
a list of random numbers.
|
map [Utility] | |
map2 [Utility] | |
map3 [Utility] |
Similar to
map2 , but 3 arguments.
|
map4 [Utility] |
Similar to
map2 , but 4 arguments.
|
map5 [Utility] |
Similar to
map2 , but 5 arguments.
|
map_lol [Utility] |
Map on lists of lists.
|
map_stream [Pdf] |
Map over just the stream objects in a document.
|
matrix_compose [Transform] | compose a b produces a matrix equivalent to performing b then a .
|
matrix_invert [Transform] | |
matrix_of_op [Transform] |
Make a matrix from a single transformation operation
|
matrix_of_transform [Transform] |
Make a matrix from a transform
|
max [Utility] |
Monomorphic integer versions of
Pervasives functions.
|
megabytes [Utility] | megabytes x is x * 1024 * 1024
|
member [Utility] |
Synonym for
List.mem .
|
member' [Utility] | List.mem with arguments reversed.
|
mergedict [Utility] |
Merge two lists, preferring elements in the second in the case of clashes.
|
min [Utility] | |
mkrotate [Transform] | |
mkscale [Transform] | |
mkshearx [Transform] | |
mksheary [Transform] | |
mkstream [Utility] |
Make from a given size.
|
mktranslate [Transform] |
Low-level functions to create transformation matrices
|
mkunit [Utility] | mkunit f x gives fun () -> f x
|
mkunitvector [Utility] |
Make a unit vector in the direction from one point to a second.
|
mkvector [Utility] | mkvector (a, b) (c, d) makes a vector from point (a, b) to point (c, d) .
|
N | |
neq [Utility] |
Inequality.
|
never [Utility] |
The always-false predicate.
|
none [Utility] |
Predicates on the someness or noneness of an
'a option .
|
notnull [Utility] |
Predicates on the nullness of a list.
|
notpred [Utility] |
Invert a predicate.
|
nudge [Io] |
Move forward one character
|
null [Utility] | |
null_hash [Utility] |
The empty zero-sized hash table.
|
O | |
objcard [Pdf] |
Return the cardinality of the object map.
|
objiter [Pdf] |
Iterate over the objects in a document.
|
objiter_gen [Pdf] |
Iterate over the objects in a document.
|
objmap [Pdf] |
Map over all pdf objects in a document.
|
odd [Utility] |
Even and odd predicates on integers.
|
offset_point [Utility] |
Offset a point by a vector.
|
option_map [Utility] | |
output_of_channel [Io] | |
output_of_stream [Io] | |
output_string [Io] |
Output a string.
|
P | |
pages_of_pagetree [Pdfdoc] |
Extract the page tree from a PDF document and parse it to a list of page
objects.
|
pair [Utility] |
A similar function to
couple , but the coupling is non-overlapping.
|
pair_ext [Utility] |
A version of
pair which adds a unary function for the singleton, much
like couple_ext .
|
pair_reduce [Utility] |
As
couple_reduce is to couple , so pair_reduce is to pair .
|
pairs [Utility] |
Produce a list of overlapping pairs of elements in a list in order, producing
the empty list if on singleton input.
|
pairs_of_list [Utility] |
Make consecutive elements of an even-length list into a list of pairs.
|
parse_function [Pdffun] | |
parse_matrix [Pdf] |
Calling
parse_matrix pdf name dict parses a PDF matrix found under
key name in dictionary dict into a Transform.transform_matrix .
|
parse_operators [Pdfpages] |
Given a pdf document, resource dictionary and list of streams representing
the graphics content (PDF allows a single page's graphics content to be split
over several streams), return a list of operators.
|
parse_rectangle [Pdf] |
Parse a PDF rectangle structure into min x, min y, max x, max y.
|
parse_stream [Pdfpages] |
Parse a single byte stream to an operator list given a document and resource
dictionary.
|
pdf_of_channel [Pdfread] |
Read a PDF from an OCaml channel.
|
pdf_of_channel_lazy [Pdfread] |
Same, but delay loading of streams and parsing of objects.
|
pdf_of_file [Pdfread] |
Read a PDF from the given filename.
|
pdf_of_input [Pdfread] |
Read a PDF from an
Io.input , with an optional user password which, if
absent, is assumed to be the empty string.
|
pdf_of_input_lazy [Pdfread] |
Same, but delay loading of streams and parsing of objects.
|
pdf_to_channel [Pdfwrite] |
Similarly to an OCaml channel.
|
pdf_to_file [Pdfwrite] |
Similarly to a named file.
|
pdf_to_output [Pdfwrite] |
Write a PDF document to an
Io.output , optionally encrypting and/or
linearizing.
|
peek_byte [Io] |
Look at the next byte without advancing the pointer.
|
peek_char [Io] |
Look at the next character without advancing the pointer.
|
perpendicular [Utility] |
Find the vector
pi / 2 anticlockwise from the given one.
|
pi [Utility] |
Pi.
|
pow [Utility] | pow x y is y to the power x
|
pow2gt [Utility] |
Largest power of two greater or equal to an integer.
|
pow2lt [Utility] |
Largest power of two smaller or equal to an integer.
|
print_bitstream [Io] |
Debug printer.
|
print_lexeme [Utility] |
Print a
Genlex.token
|
print_stream [Utility] |
Print a bytestream.
|
putbit [Io] |
Put a single bit, 0 or 1.
|
putbool [Io] |
Same, but input is boolean
|
putval [Io] |
Put a multi-bit value (given as an int32) containing the given number of
useful bits into a bitstream
|
Q | |
q_deq [Utility] |
Remove an element from the queue
|
q_enq [Utility] |
Enqueue
|
q_hd [Utility] |
Peek at the head of a queue
|
q_len [Utility] | |
q_mk [Utility] |
The empty queue
|
q_null [Utility] |
Null predicate
|
q_of_list [Utility] | |
R | |
rad_of_deg [Utility] | |
read_char_back [Io] |
Read the previous character, moving the pointer back one.
|
read_font [Pdftext] |
Read a font from a given document and object
|
read_line [Io] |
Read a line.
|
really_drop_evens [Utility] | |
recompose [Transform] |
Recompose from the above information.
|
remove [Utility] |
Remove something from a list, if it's there.
|
remove_dict_entry [Pdf] |
Remove a dictionary entry, if it exists.
|
remove_unreferenced [Pdf] |
Garbage-collect a pdf document.
|
renumber_pages [Pdfdoc] |
Rename the resources within a number of page resource dictionaries and
contents, so as to allow them to be merged without name clashes.
|
renumber_pdfs [Pdf] |
Make a number of PDF documents contain no mutual object numbers.
|
replace [Utility] | replace k v l replaces the existing binding of k in l with one with binds k
to v .
|
replace_dict_entry [Pdf] |
Replace a dictionary entry, raising
Not_found if it's not there.
|
replaceinlist [Utility] | replaceinlist f x l replaces any element of l for which f l is true
with x .
|
rev [Utility] | |
rev_compare [Utility] |
Like
Pervasives.compare , but the other way around.
|
rev_map [Utility] | |
rev_map3 [Utility] |
Similar to
rev_map , but 3 arguments.
|
rev_map4 [Utility] |
Similar to
rev_map , but 4 arguments.
|
rev_map5 [Utility] |
Similar to
rev_map , but 5 arguments.
|
rewind [Io] |
Move backward one.
|
root2 [Utility] |
Square root of two.
|
rotation_of_int [Pdfdoc] |
The reverse.
|
round [Utility] |
Round a real.
|
S | |
scalevectolength [Utility] |
Scale a vector to a given length.
|
select [Utility] |
Select the nth element in a list (first is element 1).
|
set [Utility] |
Set a boolean reference to
true
|
set_array [Utility] |
Set all the values of an array.
|
setify [Utility] |
Remove duplicates from a list.
|
setify_preserving_order [Utility] |
Same, but preserve order.
|
setminus [Utility] |
The set
setminus a b contains all those elements which are in a but are
do not appear in b .
|
some [Utility] | |
sort [Utility] |
Tail-recursive versions of list functions.
|
split [Utility] | |
split3 [Utility] | |
split8 [Utility] | |
splitat [Utility] | |
splitinto [Utility] |
Split a list into some lists of length
n (and possibly a final one of
length < n ), preserving order.
|
stream_of_int_array [Utility] |
And from an integer array
|
stream_of_ops [Pdfpages] |
Flatten a list of operators to an uncompressed PDF stream.
|
stream_size [Utility] |
Size of a stream in bytes.
|
string_of_bytestream [Utility] |
Make a string from a bytestream.
|
string_of_char [Utility] |
Make a string from a character.
|
string_of_int_array [Utility] |
A string from a single int array
|
string_of_int_arrays [Utility] |
A string from a list of integer arrays
|
string_of_matrix [Transform] |
String of a transformation matrix.
|
string_of_op [Pdfpages] |
Make a string of a single operator (for debug purposes).
|
string_of_ops [Pdfpages] |
Same, but of several operators (for debug purposes).
|
string_of_pdf [Pdfwrite] |
Calculate a string of a pdf object.
|
string_of_stream [Utility] |
A string from a bytestream
|
string_of_transform [Transform] |
Make a string of a transform for debug purposes.
|
string_selfmap [Utility] |
Map a string onto itself, character-by-character using the given function.
|
swap [Utility] |
Swaps the data at the given indexes in an array.
|
T | |
tail_no_fail [Utility] |
Like
List.tl but [] yields [] .
|
tails [Utility] |
Ditto, tails.
|
take [Utility] | take l n takes n elements from the list raising Invalid_argument if
there are not enough elements to take or if n < 0.
|
take' [Utility] |
Same, arguments reversed.
|
takewhile [Utility] |
take elements from a list while a given predicate is true.
|
text_extractor_of_font [Pdftext] |
Build a text extractor from a document and font object
|
textwidth [Fonttables] |
Calculate the width, in millipoints, of a string in the given font, taking
into account kerning.
|
tl [Utility] | |
transform [Transform] |
Transform a coordinate by a given transform.
|
transform_matrix [Transform] |
Transform a coordinate by a given transformation matrix.
|
tuple [Utility] |
Make a tuple.
|
U | |
unique_key [Pdf] |
Given a dictionary and a prefix (e.g gs), return a name, starting with the
prefix, which is not already in the dictionary (e.g /gs0).
|
unopt [Utility] |
Strip the
Some from an option.
|
until_exception [Utility] | until_exception r c Perform computation c until an exception is raised,
with the dummy return value r , of the type of the expression evaluted when the
exception is caught.
|
usletter [Paper] |
United States paper sizes.
|
utf16be_of_text [Pdftext] |
Same, but return UTF16BE
|
V | |
veclength [Utility] |
The length of a vector.
|
W | |
write_bitstream_append [Io] |
Append two write bitstreams
|
write_bitstream_append_aligned [Io] |
Same, but align at boundary
|
Z | |
zipn [Utility] |
Take a list of lists of equal length, and turn into a list of lists, the
first containing all the first elements of the original lists, the second the
second, and so on.
|