Module Cpdfpagespec

module Cpdfpagespec: sig .. end

Page specifications and ranges


Here are the rules for building input ranges:

val parse_pagespec : Pdf.t -> string -> int list

Parse a (valid) page specification to a page range

val parse_pagespec_without_pdf : string -> int list

Same, but without a PDF. Thus 'end' etc. don't work

val validate_pagespec : string -> bool

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.

val string_of_pagespec : Pdf.t -> int list -> string

Return a string for the given range. Knows how to identify all, odd, even, x-y ranges etc.

val invert_range : int -> int list -> int list

Invert a range, given the maximum page number and the range.