PDF.Rtype t = {read : bytes -> int -> int -> int;read_ba : (int ->
(char, Stdlib.Bigarray.int8_unsigned_elt, Stdlib.Bigarray.c_layout)
Stdlib.Bigarray.Array1.t)
option;custom_parser : (Metadata__.MetadataBase.parser_handler -> unit) option;seek : int -> unit;size : unit -> int option;reset : unit -> unit;}A function to read taking the buffer to fill the offset and the length and returning the number of bytes actually read.
Make a reading function retry until buffer is filled (or an error occurs).
val read : t -> int -> stringval read_tag : length:int -> label:string -> t -> string optionval drop : t -> int -> unitval byte : t -> intval uint8 : t -> intval int16_be : t -> intval int16_le : t -> intval uint16_le : t -> intval int16 : Metadata__.MetadataBase.endianness -> t -> intval int24_be : t -> intval int32_le : t -> intval uint32_le : t -> intval int32_be : t -> intval int64_be : t -> int64val size : t -> int optionval reset : t -> unitReset state like after the file was just opened (position is at the beginning in particular).
val find : t -> string -> boolTry to find a specific string starting from current position in the file.
val until : t -> string -> stringReturn the contents until we reach a specific string (not included).
val with_file :
?custom_parser:(Metadata__.MetadataBase.parser_handler -> unit) ->
(t -> 'a) ->
string ->
'bval with_string :
?custom_parser:(Metadata__.MetadataBase.parser_handler -> unit) ->
(t -> 'a) ->
string ->
'b