Sign in

    This version of the module is deprecated: Use moonbitlang/pdflite instead

    pdflite

    Download zip
    Author
    Version
    0.1.1
    License
    Apache-2.0
    Last updated
    5 months ago
    Downloads
    8K

    #bobzhang/pdflite

    PdfBytes

    type PdfBytes = Bytes

    PdfError

    pub(all) suberror PdfError {
    InvalidByte(Int)
    InvalidCursorPosition(Int)
    InvalidReadLength(Int)
    InvalidBit(Int)
    InvalidBitCount(Int)
    MatrixNotInvertable
    DictionaryExpected
    DictionaryKeyNotFound(PdfName)
    NumberExpected
    RectangleExpected
    BadRectangle
    MatrixMalformed
    InvalidHexEscape
    InvalidASCII85Data
    FilterNotSupported(PdfName)
    FilterExpected
    CCITTDecodeParmsExpected
    CCITTNotSupported(String)
    InvalidCCITTData
    PredictorExpected
    PredictorNotSupported(Int)
    InvalidLZWData
    InvalidFlateData
    ParseObjectExpected
    ParseArrayMalformed
    ParseSingleObjectExpected
    ParseIndirectObjectExpected
    ParseEndObjectExpected
    ParseStreamExpected
    ParseEndStreamExpected
    StreamLengthExpected
    StreamDataExpected
    ParsedObjectExpected
    PageTreeExpected
    PageRotationExpected(Int)
    ContentOperatorExpected
    ContentOperandExpected
    FunctionExpected
    FunctionNotSupported(Int)
    BadFunctionEvaluation(String)
    StartXRefExpected
    XRefExpected
    XRefEntryExpected
    TrailerExpected
    RootExpected
    BadRevision
    InvalidObjectNumber(Int)
    BadDate
    InvalidUnicodeCodepoint(Int)
    InvalidUTF16BE
    InvalidUTF8
    InvalidPDFDocEncoding(Int)
    CryptoKeyExpected
    InvalidCryptoDataLength(Int)
    EncryptionExpected
    EncryptionMethodExpected
    EncryptionDictionaryEntryExpected(PdfName)
    EncryptionDictionaryEntryTooShort(PdfName)
    EncryptionIDExpected
    EncryptionAuthenticationUnsupported(PdfCryptType)
    EncryptionObjectCryptUnsupported(PdfCryptType)
    EncryptionSavedStateExpected
    EncryptionRecryptUnsupported(PdfCryptType)
    EncryptionRecryptFailed
    EncryptionPermissionsCorrupt
    EncryptionPermissionsMismatch(Int, Int)
    RandomBytesUnavailable
    EncodingExpected
    EncodingDifferencesMalformed
    EncodingWriteUnsupported
    FontSubtypeExpected
    FontFlagsExpected
    StandardFontExpected
    BaseFontExpected
    FontFirstCharExpected
    FontLastCharExpected
    FontWidthsExpected
    FontWidthExpected
    FontCharProcsExpected
    FontTypeExpected
    FontWriteUnsupported
    AfmExpected
    ColourSpaceExpected
    BadText
    CIDSystemInfoExpected
    CIDRegistryExpected
    CIDOrderingExpected
    CIDSupplementExpected
    CIDBaseFontExpected
    CIDFontDescriptorExpected
    CIDWidthsExpected
    CIDWidths2Expected
    DescendantFontExpected
    CMapEncodingExpected
    PageLabelStyleExpected(String)
    EndOfInput
    } derive(Eq, ToJson,
    Debug
    )

    BitStream

    pub struct BitStream {
    input : ByteCursor
    current_byte : Int
    bit_mask : Int
    bits_read : Int
    } derive(Eq, ToJson,
    Debug
    )

    BitStream::align

    fn BitStream::align(self : BitStream) -> Unit

    BitStream::bits_read

    fn BitStream::bits_read(self : BitStream) -> Int

    BitStream::get_bit

    fn BitStream::get_bit(self : BitStream) -> Bool raise PdfError

    BitStream::get_bit_int

    fn BitStream::get_bit_int(self : BitStream) -> Int raise PdfError

    BitStream::get_value_int

    fn BitStream::get_value_int(self : BitStream, width : Int) -> Int raise PdfError

    BitStream::get_value_int64

    fn BitStream::get_value_int64(self : BitStream, width : Int) -> Int64 raise PdfError

    BitStream::position

    fn BitStream::position(self : BitStream) -> BitStreamPosition

    BitStream::seek

    fn BitStream::seek(self : BitStream, position : BitStreamPosition) -> Unit

    BitStreamPosition

    pub struct BitStreamPosition {
    input_position : Int
    current_byte : Int
    bit_mask : Int
    bits_read : Int
    } derive(Eq, ToJson,
    Debug
    )

    BitWriter

    pub struct BitWriter {
    current_byte : Int
    bit_index : Int
    bytes : Array[Byte]
    } derive(Eq, ToJson,
    Debug
    )

    BitWriter::align

    fn BitWriter::align(self : BitWriter) -> Unit

    BitWriter::append_aligned

    fn BitWriter::append_aligned(self : BitWriter, other : BitWriter) -> BitWriter

    BitWriter::bit_length

    fn BitWriter::bit_length(self : BitWriter) -> Int

    BitWriter::put_bit

    fn BitWriter::put_bit(self : BitWriter, bit : Int) -> Unit raise PdfError

    BitWriter::put_value_int

    fn BitWriter::put_value_int(self : BitWriter, width : Int, value : Int) -> Unit raise PdfError

    BitWriter::put_value_int64

    fn BitWriter::put_value_int64(self : BitWriter, width : Int, value : Int64) -> Unit raise PdfError

    BitWriter::to_bytes

    fn BitWriter::to_bytes(self : BitWriter) -> Bytes

    ByteCursor

    pub struct ByteCursor {
    data : BytesView
    position : Int
    offset : Int
    source : String
    } derive(Eq, ToJson,
    Debug
    )

    ByteCursor::absolute_position

    fn ByteCursor::absolute_position(self : ByteCursor) -> Int

    ByteCursor::drop_pdf_whitespace

    fn ByteCursor::drop_pdf_whitespace(self : ByteCursor) -> Unit

    ByteCursor::ignore_until

    fn ByteCursor::ignore_until(self : ByteCursor, stop : (Int) -> Bool, eof_is_delimiter? : Bool) -> Unit raise PdfError

    ByteCursor::input_byte

    fn ByteCursor::input_byte(self : ByteCursor) -> Int

    ByteCursor::input_pdf_error

    fn ByteCursor::input_pdf_error(self : ByteCursor, message : String) -> String

    ByteCursor::length

    fn ByteCursor::length(self : ByteCursor) -> Int

    ByteCursor::lex_pdf_bool

    fn ByteCursor::lex_pdf_bool(self : ByteCursor) -> PdfLexeme

    ByteCursor::lex_pdf_comment

    fn ByteCursor::lex_pdf_comment(self : ByteCursor) -> PdfLexeme

    ByteCursor::lex_pdf_delimiter

    fn ByteCursor::lex_pdf_delimiter(self : ByteCursor) -> PdfLexeme

    ByteCursor::lex_pdf_hex_string

    fn ByteCursor::lex_pdf_hex_string(self : ByteCursor) -> PdfLexeme raise PdfError

    ByteCursor::lex_pdf_keyword

    fn ByteCursor::lex_pdf_keyword(self : ByteCursor) -> PdfLexeme raise PdfError

    ByteCursor::lex_pdf_literal_string

    fn ByteCursor::lex_pdf_literal_string(self : ByteCursor) -> PdfLexeme raise PdfError

    ByteCursor::lex_pdf_name

    fn ByteCursor::lex_pdf_name(self : ByteCursor) -> PdfLexeme raise PdfError

    ByteCursor::lex_pdf_number

    fn ByteCursor::lex_pdf_number(self : ByteCursor) -> PdfLexeme

    ByteCursor::lex_pdf_token

    fn ByteCursor::lex_pdf_token(self : ByteCursor) -> PdfLexeme raise PdfError

    ByteCursor::lex_pdf_tokens

    fn ByteCursor::lex_pdf_tokens(self : ByteCursor) -> Array[PdfLexeme] raise PdfError

    ByteCursor::nudge

    fn ByteCursor::nudge(self : ByteCursor) -> Unit

    ByteCursor::peek

    fn ByteCursor::peek(self : ByteCursor) -> Byte?

    ByteCursor::peek_byte

    fn ByteCursor::peek_byte(self : ByteCursor) -> Int

    ByteCursor::peek_bytes

    fn ByteCursor::peek_bytes(self : ByteCursor, length : Int) -> Bytes raise PdfError

    ByteCursor::peek_view

    fn ByteCursor::peek_view(self : ByteCursor, length : Int) -> BytesView raise PdfError

    ByteCursor::position

    fn ByteCursor::position(self : ByteCursor) -> Int

    ByteCursor::read_byte

    fn ByteCursor::read_byte(self : ByteCursor) -> Byte?

    ByteCursor::read_byte_back

    fn ByteCursor::read_byte_back(self : ByteCursor) -> Byte?

    ByteCursor::read_bytes

    fn ByteCursor::read_bytes(self : ByteCursor, length : Int) -> Bytes raise PdfError

    ByteCursor::read_bytes_at

    fn ByteCursor::read_bytes_at(self : ByteCursor, position : Int, length : Int) -> Bytes raise PdfError

    ByteCursor::read_jpeg_data

    fn ByteCursor::read_jpeg_data(self : ByteCursor) -> Bytes raise PdfError

    ByteCursor::read_line

    fn ByteCursor::read_line(self : ByteCursor) -> Bytes raise PdfError

    ByteCursor::read_line_view

    fn ByteCursor::read_line_view(self : ByteCursor) -> BytesView raise PdfError

    ByteCursor::read_line_views

    fn ByteCursor::read_line_views(self : ByteCursor) -> Array[BytesView]

    ByteCursor::read_lines

    fn ByteCursor::read_lines(self : ByteCursor) -> Array[Bytes]

    ByteCursor::read_pdf_header

    fn ByteCursor::read_pdf_header(self : ByteCursor) -> PdfVersion raise PdfError

    ByteCursor::read_pdf_regular_token_view

    fn ByteCursor::read_pdf_regular_token_view(self : ByteCursor) -> BytesView

    ByteCursor::read_remaining_bytes

    fn ByteCursor::read_remaining_bytes(self : ByteCursor) -> Bytes

    ByteCursor::read_until_pdf_whitespace_or_delimiter

    fn ByteCursor::read_until_pdf_whitespace_or_delimiter(self : ByteCursor) -> BytesView

    ByteCursor::read_until_view

    fn ByteCursor::read_until_view(self : ByteCursor, stop : (Int) -> Bool, eof_is_delimiter? : Bool) -> BytesView raise PdfError

    ByteCursor::read_view

    fn ByteCursor::read_view(self : ByteCursor, length : Int) -> BytesView raise PdfError

    ByteCursor::read_view_at

    fn ByteCursor::read_view_at(self : ByteCursor, position : Int, length : Int) -> BytesView raise PdfError

    ByteCursor::remaining_length

    fn ByteCursor::remaining_length(self : ByteCursor) -> Int

    ByteCursor::remaining_view

    fn ByteCursor::remaining_view(self : ByteCursor) -> BytesView

    ByteCursor::rewind

    fn ByteCursor::rewind(self : ByteCursor) -> Unit raise PdfError

    ByteCursor::seek

    fn ByteCursor::seek(self : ByteCursor, position : Int) -> Unit raise PdfError

    ByteCursor::set_offset

    fn ByteCursor::set_offset(self : ByteCursor, offset : Int) -> Unit raise PdfError

    ByteCursor::source

    fn ByteCursor::source(self : ByteCursor) -> String

    ByteCursor::to_bytes

    fn ByteCursor::to_bytes(self : ByteCursor) -> Bytes

    ByteCursor::view

    fn ByteCursor::view(self : ByteCursor) -> BytesView

    ByteOutput

    pub struct ByteOutput {
    data : Array[Byte]
    position : Int
    written_length : Int
    } derive(Eq, ToJson,
    Debug
    )

    ByteOutput::length

    fn ByteOutput::length(self : ByteOutput) -> Int

    ByteOutput::position

    fn ByteOutput::position(self : ByteOutput) -> Int

    ByteOutput::seek

    fn ByteOutput::seek(self : ByteOutput, position : Int) -> Unit raise PdfError

    ByteOutput::to_bytes

    fn ByteOutput::to_bytes(self : ByteOutput) -> Bytes

    ByteOutput::write_ascii

    fn ByteOutput::write_ascii(self : ByteOutput, text : String) -> Unit raise PdfError

    ByteOutput::write_byte

    fn ByteOutput::write_byte(self : ByteOutput, value : Int) -> Unit raise PdfError

    ByteOutput::write_byte_at

    fn ByteOutput::write_byte_at(self : ByteOutput, position : Int, value : Int) -> Unit raise PdfError

    ByteOutput::write_repeated_byte

    fn ByteOutput::write_repeated_byte(self : ByteOutput, length : Int, value? : Int) -> Unit raise PdfError

    ByteOutput::write_view

    fn ByteOutput::write_view(self : ByteOutput, bytes : BytesView) -> Unit raise PdfError

    ByteOutput::write_view_at

    fn ByteOutput::write_view_at(self : ByteOutput, position : Int, bytes : BytesView) -> Unit raise PdfError

    ByteOutput::write_view_slice

    fn ByteOutput::write_view_slice(self : ByteOutput, bytes : BytesView, offset : Int, length : Int) -> Unit raise PdfError

    ObjectStreamReference

    pub(all) struct ObjectStreamReference {
    object_stream_number : Int
    index : Int
    } derive(Eq, ToJson,
    Debug
    )

    PaperSize

    pub(all) struct PaperSize {
    unit : PdfUnit
    width : Double
    height : Double
    } derive(Eq, ToJson,
    Debug
    )

    PaperSize::height

    fn PaperSize::height(self : PaperSize) -> Double

    PaperSize::landscape

    fn PaperSize::landscape(self : PaperSize) -> PaperSize

    PaperSize::unit

    fn PaperSize::unit(self : PaperSize) -> PdfUnit

    PaperSize::width

    fn PaperSize::width(self : PaperSize) -> Double

    PdfAesV3RandomField

    pub(all) enum PdfAesV3RandomField {
    PdfAesV3FileKey
    PdfAesV3UserValidationSalt
    PdfAesV3UserKeySalt
    PdfAesV3OwnerValidationSalt
    PdfAesV3OwnerKeySalt
    PdfAesV3PermissionsPadding
    } derive(Eq, ToJson,
    Debug
    )

    PdfAfmData

    pub(all) struct PdfAfmData {
    headers : Array[(Bytes, Bytes)]
    char_metrics : Array[(Int, Int)]
    kerns : Array[(Int, Int, Int)]
    char_name_widths : Array[(Bytes, Int)]
    } derive(Eq, ToJson,
    Debug
    )

    PdfAnnotation

    pub(all) struct PdfAnnotation {
    subtype : PdfAnnotationSubtype
    contents : Bytes?
    subject : Bytes?
    rectangle : PdfRectangle
    border : PdfAnnotationBorder
    colour : PdfAnnotationColour?
    rest : PdfObject
    } derive(Eq, ToJson,
    Debug
    )

    PdfAnnotationBorder

    pub(all) struct PdfAnnotationBorder {
    width : Double
    vertical_radius : Double
    horizontal_radius : Double
    style : PdfAnnotationStyle
    dash_array : Array[Int]
    } derive(Eq, ToJson,
    Debug
    )

    PdfAnnotationColour

    pub(all) struct PdfAnnotationColour {
    red : Int
    green : Int
    blue : Int
    } derive(Eq, ToJson,
    Debug
    )

    PdfAnnotationStyle

    pub(all) enum PdfAnnotationStyle {
    AnnotationNoStyle
    AnnotationSolid
    AnnotationDashed
    AnnotationBeveled
    AnnotationInset
    AnnotationUnderlineStyle
    } derive(Eq, ToJson,
    Debug
    )

    PdfAnnotationSubtype

    pub(all) enum PdfAnnotationSubtype {
    AnnotationText
    AnnotationLink
    AnnotationFreeText
    AnnotationLine
    AnnotationSquare
    AnnotationCircle
    AnnotationPolygon
    AnnotationPolyLine
    AnnotationHighlight
    AnnotationUnderline
    AnnotationSquiggly
    AnnotationStrikeOut
    AnnotationStamp
    AnnotationCaret
    AnnotationInk
    AnnotationPopup(PdfAnnotation)
    AnnotationFileAttachment
    AnnotationSound
    AnnotationMovie
    AnnotationWidget
    AnnotationScreen
    AnnotationPrinterMark
    AnnotationTrapNet
    AnnotationWatermark
    AnnotationThreeDee
    AnnotationUnknown(PdfName)
    } derive(Eq, ToJson,
    Debug
    )

    PdfBookmark

    pub(all) struct PdfBookmark {
    level : Int
    text : Bytes
    target : PdfDestination
    is_open : Bool
    colour : PdfBookmarkColour
    flags : Int
    } derive(Eq, ToJson,
    Debug
    )

    PdfBookmarkColour

    pub(all) struct PdfBookmarkColour {
    red : Double
    green : Double
    blue : Double
    } derive(Eq, ToJson,
    Debug
    )

    PdfBookmarkNode

    type PdfBookmarkNode derive(Eq, ToJson,
    Debug
    )

    PdfCIDKeyedFont

    pub(all) struct PdfCIDKeyedFont {
    basefont : PdfName
    composite : PdfCompositeCIDFont
    encoding : PdfCMapEncoding
    } derive(Eq, ToJson,
    Debug
    )

    PdfCIDKeyedFont::debug_name

    fn PdfCIDKeyedFont::debug_name(self : PdfCIDKeyedFont) -> String

    PdfCIDKeyedFont::is_identity_h

    fn PdfCIDKeyedFont::is_identity_h(self : PdfCIDKeyedFont) -> Bool

    PdfCIDKeyedFont::is_identity_v

    fn PdfCIDKeyedFont::is_identity_v(self : PdfCIDKeyedFont) -> Bool

    PdfCIDKeyedFont::uses_two_byte_codes

    fn PdfCIDKeyedFont::uses_two_byte_codes(self : PdfCIDKeyedFont) -> Bool

    PdfCIDSystemInfo

    pub(all) struct PdfCIDSystemInfo {
    registry : Bytes
    ordering : Bytes
    supplement : Int
    } derive(Eq, ToJson,
    Debug
    )

    PdfCIDVerticalWidth

    pub(all) struct PdfCIDVerticalWidth {
    width : Double
    vx : Double
    vy : Double
    } derive(Eq, ToJson,
    Debug
    )

    PdfCMapCodeSpace

    pub(all) struct PdfCMapCodeSpace {
    length : Int
    first : Int
    last : Int
    } derive(Eq, ToJson,
    Debug
    )

    PdfCMapEncoding

    pub(all) enum PdfCMapEncoding {
    PdfPredefinedCMap(PdfName)
    PdfCMap(Int)
    PdfExternalCMap(Int, PdfParsedCMap)
    } derive(Eq, ToJson,
    Debug
    )

    PdfCMapEncoding::is_identity_h

    fn PdfCMapEncoding::is_identity_h(self : PdfCMapEncoding) -> Bool

    PdfCMapEncoding::is_identity_v

    fn PdfCMapEncoding::is_identity_v(self : PdfCMapEncoding) -> Bool

    PdfCMapEncoding::uses_two_byte_codes

    fn PdfCMapEncoding::uses_two_byte_codes(self : PdfCMapEncoding) -> Bool

    PdfCalculatorFunction

    pub(all) struct PdfCalculatorFunction {
    operations : Array[PdfCalculatorOp]
    } derive(Eq, ToJson,
    Debug
    )

    PdfCalculatorOp

    pub(all) enum PdfCalculatorOp {
    PdfCalculatorInt(Int)
    PdfCalculatorFloat(Double)
    PdfCalculatorAbs
    PdfCalculatorAdd
    PdfCalculatorAnd
    PdfCalculatorAtan
    PdfCalculatorBitshift
    PdfCalculatorBool(Bool)
    PdfCalculatorCeiling
    PdfCalculatorCos
    PdfCalculatorCopy
    PdfCalculatorCvi
    PdfCalculatorCvr
    PdfCalculatorSub
    PdfCalculatorMul
    PdfCalculatorDiv
    PdfCalculatorDup
    PdfCalculatorExch
    PdfCalculatorExp
    PdfCalculatorFloor
    PdfCalculatorIdiv
    PdfCalculatorIf(Array[PdfCalculatorOp])
    PdfCalculatorIfElse(Array[PdfCalculatorOp], Array[PdfCalculatorOp])
    PdfCalculatorIndex
    PdfCalculatorLn
    PdfCalculatorLog
    PdfCalculatorEq
    PdfCalculatorGe
    PdfCalculatorGt
    PdfCalculatorLe
    PdfCalculatorLt
    PdfCalculatorMod
    PdfCalculatorNe
    PdfCalculatorNeg
    PdfCalculatorNot
    PdfCalculatorOr
    PdfCalculatorPop
    PdfCalculatorRoll
    PdfCalculatorRound
    PdfCalculatorSin
    PdfCalculatorSqrt
    PdfCalculatorTruncate
    PdfCalculatorXor
    } derive(Eq, ToJson,
    Debug
    )

    PdfCalculatorOp::debug_name

    fn PdfCalculatorOp::debug_name(self : PdfCalculatorOp) -> String

    PdfClassicXRefEntry

    type PdfClassicXRefEntry derive(Eq, ToJson,
    Debug
    )

    PdfColourSpace

    pub(all) enum PdfColourSpace {
    PdfDeviceGray
    PdfDeviceRGB
    PdfDeviceCMYK
    PdfCalGray(PdfTristimulusPoint, PdfTristimulusPoint, Double)
    PdfCalRGB(PdfTristimulusPoint, PdfTristimulusPoint, Array[Double], Array[Double])
    PdfLab(PdfTristimulusPoint, PdfTristimulusPoint, Array[Double])
    PdfICCBased(Int, PdfColourSpace, Array[Double], PdfObject?, PdfObject)
    PdfIndexed(PdfColourSpace, Array[(Int, Array[Int])])
    PdfPattern
    PdfPatternWithBaseColourSpace(PdfColourSpace)
    PdfSeparation(PdfName, PdfColourSpace, PdfObject)
    PdfDeviceN(Array[PdfName], PdfColourSpace, PdfObject, PdfObject)
    } derive(Eq, ToJson,
    Debug
    )

    PdfColourSpace::debug_name

    fn PdfColourSpace::debug_name(self : PdfColourSpace) -> String

    PdfColourSpace::name

    PdfCompositeCIDFont

    pub(all) struct PdfCompositeCIDFont {
    cid_system_info : PdfCIDSystemInfo
    cid_basefont : PdfName
    cid_fontdescriptor : PdfFontDescriptor
    cid_widths : Array[(Int, Double)]
    cid_widths2 : Array[(Int, PdfCIDVerticalWidth)]
    cid_default_width : Double
    cid_default_width2 : Array[Double]
    } derive(Eq, ToJson,
    Debug
    )

    PdfContentInlineTextFilter

    type PdfContentInlineTextFilter derive(Eq,
    Debug
    )

    PdfContentLexeme

    type PdfContentLexeme derive(Eq, ToJson,
    Debug
    )

    PdfContentOp

    pub(all) enum PdfContentOp {
    Op_w(Double)
    Op_J(Int)
    Op_j(Int)
    Op_M(Double)
    Op_d(Array[Double], Double)
    Op_ri(PdfName)
    Op_i(Double)
    Op_q
    Op_Q
    Op_cm(TransformMatrix)
    Op_m(Double, Double)
    Op_l(Double, Double)
    Op_c(Double, Double, Double, Double, Double, Double)
    Op_v(Double, Double, Double, Double)
    Op_y(Double, Double, Double, Double)
    Op_h
    Op_re(Double, Double, Double, Double)
    Op_S
    Op_s
    Op_f
    Op_F
    Op_fstar
    Op_B
    Op_Bstar
    Op_b
    Op_bstar
    Op_n
    Op_W
    Op_Wstar
    Op_BT
    Op_ET
    Op_Tc(Double)
    Op_Tw(Double)
    Op_Tz(Double)
    Op_TL(Double)
    Op_Tf(PdfName, Double)
    Op_Tr(Int)
    Op_Ts(Double)
    Op_Td(Double, Double)
    Op_TD(Double, Double)
    Op_Tm(TransformMatrix)
    Op_Tstar
    Op_Tj(Bytes)
    Op_TJ(PdfObject)
    Op_quote(Bytes)
    Op_double_quote(Double, Double, Bytes)
    Op_d0(Double, Double)
    Op_d1(Double, Double, Double, Double, Double, Double)
    Op_G(Double)
    Op_g(Double)
    Op_RG(Double, Double, Double)
    Op_rg(Double, Double, Double)
    Op_K(Double, Double, Double, Double)
    Op_k(Double, Double, Double, Double)
    Op_gs(PdfName)
    Op_CS(PdfName)
    Op_cs(PdfName)
    Op_SC(Array[Double])
    Op_sc(Array[Double])
    Op_SCN(Array[Double])
    Op_scn(Array[Double])
    Op_SCNName(PdfName, Array[Double])
    Op_scnName(PdfName, Array[Double])
    Op_sh(PdfName)
    Op_Do(PdfName)
    Op_InlineImage(PdfObject, PdfObject?, Bytes)
    Op_MP(PdfName)
    Op_DP(PdfName, PdfObject)
    Op_BMC(PdfName)
    Op_BDC(PdfName, PdfObject)
    Op_EMC
    Op_BX
    Op_EX
    Op_Unknown(Bytes)
    } derive(Eq, ToJson,
    Debug
    )

    PdfCryptType

    pub(all) enum PdfCryptType {
    PdfCryptARC4(Int, Int)
    PdfCryptAESV2
    PdfCryptAESV3(Bool)
    } derive(Eq, ToJson,
    Debug
    )

    PdfDate

    pub(all) struct PdfDate {
    year : Int
    month : Int
    day : Int
    hour : Int
    minute : Int
    second : Int
    hour_offset : Int
    minute_offset : Int
    } derive(Eq, ToJson,
    Debug
    )

    PdfDecryptionResult

    pub(all) struct PdfDecryptionResult {
    document : PdfDocument
    denied_permissions : Array[PdfPermission]
    } derive(Eq, ToJson,
    Debug
    )

    PdfDestination

    pub(all) enum PdfDestination {
    DestAction(PdfObject)
    DestNull
    DestNamed(PdfName)
    DestString(Bytes)
    DestXYZ(PdfTargetPage, Double?, Double?, Double?)
    DestFit(PdfTargetPage)
    DestFitH(PdfTargetPage, Double?)
    DestFitV(PdfTargetPage, Double?)
    DestFitR(PdfTargetPage, Double, Double, Double, Double)
    DestFitB(PdfTargetPage)
    DestFitBH(PdfTargetPage, Double?)
    DestFitBV(PdfTargetPage, Double?)
    } derive(Eq, ToJson,
    Debug
    )

    PdfDocument

    pub struct PdfDocument {
    major : Int
    minor : Int
    root : Int
    objects : PdfObjects
    trailer_dict : PdfObject
    was_linearized : Bool
    saved_encryption : PdfSavedEncryption?
    first_xref : Int
    revision_read : Int
    } derive(Eq, ToJson,
    Debug
    )

    PdfDocument::add_annotation

    fn PdfDocument::add_annotation(self : PdfDocument, page : PdfPage, annotation : PdfAnnotation) -> PdfPage raise PdfError

    PdfDocument::add_bookmarks

    fn PdfDocument::add_bookmarks(self : PdfDocument, bookmarks : ArrayView[PdfBookmark]) -> PdfDocument raise PdfError

    PdfDocument::add_object

    fn PdfDocument::add_object(self : PdfDocument, object : PdfObject, generation? : Int) -> Int

    PdfDocument::add_object_given_number

    fn PdfDocument::add_object_given_number(self : PdfDocument, number : Int, object : PdfObject, generation? : Int) -> Unit

    PdfDocument::add_pagetree

    fn PdfDocument::add_pagetree(self : PdfDocument, pages : ArrayView[PdfPage]) -> Int raise PdfError

    PdfDocument::add_prefix

    fn PdfDocument::add_prefix(self : PdfDocument, prefix : String) -> Unit raise PdfError

    PdfDocument::add_root

    fn PdfDocument::add_root(self : PdfDocument, page_root_number : Int, extras : ArrayView[(PdfName, PdfObject)]) -> Int raise PdfError

    PdfDocument::aesv2_decrypt_parsed_objects

    fn PdfDocument::aesv2_decrypt_parsed_objects(self : PdfDocument, file_key : BytesView, key_length_bits : Int, no_encrypt_metadata? : Bool, skip_object_number? : Int) -> PdfDocument raise PdfError

    PdfDocument::aesv2_encrypt_parsed_objects_with_iv_provider

    fn PdfDocument::aesv2_encrypt_parsed_objects_with_iv_provider(self : PdfDocument, file_key : BytesView, key_length_bits : Int, iv_provider : (Int, Int, Int) -> Bytes raise PdfError, no_encrypt_metadata? : Bool, skip_object_number? : Int) -> PdfDocument raise PdfError

    PdfDocument::aesv3_decrypt_parsed_objects

    fn PdfDocument::aesv3_decrypt_parsed_objects(self : PdfDocument, file_key : BytesView, no_encrypt_metadata? : Bool, skip_object_number? : Int) -> PdfDocument raise PdfError

    PdfDocument::aesv3_encrypt_parsed_objects_with_iv_provider

    fn PdfDocument::aesv3_encrypt_parsed_objects_with_iv_provider(self : PdfDocument, file_key : BytesView, iv_provider : (Int, Int, Int) -> Bytes raise PdfError, no_encrypt_metadata? : Bool, skip_object_number? : Int) -> PdfDocument raise PdfError

    PdfDocument::annotations_of_page

    fn PdfDocument::annotations_of_page(self : PdfDocument, page : PdfPage) -> Array[PdfAnnotation] raise PdfError

    PdfDocument::arc4_crypt_parsed_objects

    fn PdfDocument::arc4_crypt_parsed_objects(self : PdfDocument, file_key : BytesView, key_length_bits : Int, no_encrypt_metadata? : Bool, skip_object_number? : Int) -> PdfDocument raise PdfError

    PdfDocument::bpc

    fn PdfDocument::bpc(self : PdfDocument, image : PdfObject) -> PdfObject?

    PdfDocument::build_name_tree

    fn PdfDocument::build_name_tree(self : PdfDocument, entries : ArrayView[(Bytes, PdfObject)]) -> PdfObject

    PdfDocument::build_number_tree

    fn PdfDocument::build_number_tree(self : PdfDocument, entries : ArrayView[(Int, PdfObject)]) -> PdfObject

    PdfDocument::catalog

    fn PdfDocument::catalog(self : PdfDocument) -> PdfObject raise PdfError

    PdfDocument::change_id

    fn PdfDocument::change_id(self : PdfDocument, path : String, get_time : () -> Double) -> Unit raise PdfError

    PdfDocument::change_pages

    fn PdfDocument::change_pages(self : PdfDocument, pages : ArrayView[PdfPage], change_references? : Bool, matrices? : ArrayView[(Int, TransformMatrix)], changes? : ArrayView[(Int, Int)]) -> PdfDocument raise PdfError

    PdfDocument::colour_space_components

    fn PdfDocument::colour_space_components(self : PdfDocument, resources : PdfObject, object : PdfObject) -> Int raise PdfError

    PdfDocument::colspace

    fn PdfDocument::colspace(self : PdfDocument, image : PdfObject, resources : PdfObject) -> PdfColourSpace raise PdfError

    PdfDocument::combine_pdf_resources

    fn PdfDocument::combine_pdf_resources(self : PdfDocument, first : PdfObject, second : PdfObject) -> PdfObject

    PdfDocument::contents_of_name_tree

    fn PdfDocument::contents_of_name_tree(self : PdfDocument, tree : PdfObject) -> Array[(PdfObject, PdfObject)]

    PdfDocument::copy

    fn PdfDocument::copy(self : PdfDocument) -> PdfDocument

    PdfDocument::decrypt_single_stream

    fn PdfDocument::decrypt_single_stream(self : PdfDocument, object_number : Int, generation : Int, stream : PdfObject, user_password? : BytesView?, owner_password? : BytesView?, no_encrypt_metadata? : Bool) -> PdfObject? raise PdfError

    PdfDocument::decrypt_with_owner_password

    fn PdfDocument::decrypt_with_owner_password(self : PdfDocument, password : BytesView, no_encrypt_metadata? : Bool) -> PdfDecryptionResult? raise PdfError

    PdfDocument::decrypt_with_passwords

    fn PdfDocument::decrypt_with_passwords(self : PdfDocument, user_password? : BytesView?, owner_password? : BytesView?, no_encrypt_metadata? : Bool) -> PdfDecryptionResult? raise PdfError

    PdfDocument::decrypt_with_user_password

    fn PdfDocument::decrypt_with_user_password(self : PdfDocument, password : BytesView, no_encrypt_metadata? : Bool) -> PdfDecryptionResult? raise PdfError

    PdfDocument::direct

    fn PdfDocument::direct(self : PdfDocument, object : PdfObject) -> PdfObject

    PdfDocument::encrypt_128bit

    fn PdfDocument::encrypt_128bit(self : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], file_id? : BytesView) -> PdfDocument raise PdfError

    PdfDocument::encrypt_128bit_aesv2

    fn PdfDocument::encrypt_128bit_aesv2(self : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], encrypt_metadata? : Bool, file_id? : BytesView) -> PdfDocument raise PdfError

    PdfDocument::encrypt_128bit_aesv2_with_iv_provider

    fn PdfDocument::encrypt_128bit_aesv2_with_iv_provider(self : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], iv_provider : (Int, Int, Int) -> Bytes raise PdfError, encrypt_metadata? : Bool, file_id? : BytesView) -> PdfDocument raise PdfError

    PdfDocument::encrypt_128bit_r4

    fn PdfDocument::encrypt_128bit_r4(self : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], encrypt_metadata? : Bool, file_id? : BytesView) -> PdfDocument raise PdfError

    PdfDocument::encrypt_256bit_aesv3

    fn PdfDocument::encrypt_256bit_aesv3(self : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], iso? : Bool, encrypt_metadata? : Bool, file_id? : BytesView) -> PdfDocument raise PdfError

    PdfDocument::encrypt_256bit_aesv3_iso

    fn PdfDocument::encrypt_256bit_aesv3_iso(self : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], encrypt_metadata? : Bool, file_id? : BytesView) -> PdfDocument raise PdfError

    PdfDocument::encrypt_256bit_aesv3_iso_with_providers

    fn PdfDocument::encrypt_256bit_aesv3_iso_with_providers(self : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], random_provider : (PdfAesV3RandomField, Int) -> Bytes raise PdfError, iv_provider : (Int, Int, Int) -> Bytes raise PdfError, encrypt_metadata? : Bool, file_id? : BytesView) -> PdfDocument raise PdfError

    PdfDocument::encrypt_256bit_aesv3_with_providers

    fn PdfDocument::encrypt_256bit_aesv3_with_providers(self : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], random_provider : (PdfAesV3RandomField, Int) -> Bytes raise PdfError, iv_provider : (Int, Int, Int) -> Bytes raise PdfError, iso? : Bool, encrypt_metadata? : Bool, file_id? : BytesView) -> PdfDocument raise PdfError

    PdfDocument::encrypt_40bit

    fn PdfDocument::encrypt_40bit(self : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], file_id? : BytesView) -> PdfDocument raise PdfError

    PdfDocument::encryption_values

    fn PdfDocument::encryption_values(self : PdfDocument) -> PdfEncryptionValues raise PdfError

    PdfDocument::endpage

    fn PdfDocument::endpage(self : PdfDocument) -> Int raise PdfError

    PdfDocument::endpage_fast

    fn PdfDocument::endpage_fast(self : PdfDocument) -> Int raise PdfError

    PdfDocument::event_log

    fn PdfDocument::event_log(self : PdfDocument) -> Array[(Int, PdfObjectEvent)]

    PdfDocument::first_xref

    fn PdfDocument::first_xref(self : PdfDocument) -> Int

    PdfDocument::get_image_24bpp

    fn PdfDocument::get_image_24bpp(self : PdfDocument, resources : PdfObject, image : PdfObject) -> PdfImage raise PdfError

    PdfDocument::get_number

    fn PdfDocument::get_number(self : PdfDocument, object : PdfObject) -> Double raise PdfError

    PdfDocument::image_bits_per_component

    fn PdfDocument::image_bits_per_component(self : PdfDocument, image : PdfObject) -> PdfObject?

    PdfDocument::image_colour_space

    fn PdfDocument::image_colour_space(self : PdfDocument, image : PdfObject, resources : PdfObject) -> PdfColourSpace raise PdfError

    PdfDocument::indirect_number

    fn PdfDocument::indirect_number(self : PdfDocument, key : PdfName, object : PdfObject) -> Int?

    PdfDocument::is_cidkeyed_font

    fn PdfDocument::is_cidkeyed_font(self : PdfDocument, font : PdfObject) -> Bool

    PdfDocument::is_encrypted

    fn PdfDocument::is_encrypted(self : PdfDocument) -> Bool

    PdfDocument::is_simple_font

    fn PdfDocument::is_simple_font(self : PdfDocument, font : PdfObject) -> Bool

    PdfDocument::is_standard14_font

    fn PdfDocument::is_standard14_font(self : PdfDocument, font : PdfObject) -> Bool

    PdfDocument::iter_objects

    fn PdfDocument::iter_objects(self : PdfDocument, callback : (Int, PdfObject) -> Unit raise) -> Unit raise

    PdfDocument::iter_objects_in_order

    fn PdfDocument::iter_objects_in_order(self : PdfDocument, callback : (Int, PdfObject) -> Unit raise) -> Unit raise

    PdfDocument::iter_objects_with_generation

    fn PdfDocument::iter_objects_with_generation(self : PdfDocument, callback : (Int, Int, PdfObject) -> Unit raise) -> Unit raise

    PdfDocument::iter_stream

    fn PdfDocument::iter_stream(self : PdfDocument, callback : (PdfObject) -> Unit raise) -> Unit raise

    PdfDocument::lookup_chain

    fn PdfDocument::lookup_chain(self : PdfDocument, start : PdfObject, keys : ArrayView[PdfName]) -> PdfObject?

    PdfDocument::lookup_direct

    fn PdfDocument::lookup_direct(self : PdfDocument, key : PdfName, object : PdfObject) -> PdfObject?

    PdfDocument::lookup_direct_or_array

    fn PdfDocument::lookup_direct_or_array(self : PdfDocument, name : PdfName, object : PdfObject) -> PdfObject?

    PdfDocument::lookup_direct_or_else

    fn PdfDocument::lookup_direct_or_else(self : PdfDocument, first_key : PdfName, second_key : PdfName, object : PdfObject) -> PdfObject?

    PdfDocument::lookup_object_or_null

    fn PdfDocument::lookup_object_or_null(self : PdfDocument, number : Int) -> PdfObject

    PdfDocument::lookup_required

    fn PdfDocument::lookup_required(self : PdfDocument, key : PdfName, object : PdfObject, error : PdfError) -> PdfObject raise PdfError

    PdfDocument::map_objects_in_place

    fn PdfDocument::map_objects_in_place(self : PdfDocument, transform : (PdfObject) -> PdfObject) -> Unit

    PdfDocument::merge_content_streams

    fn PdfDocument::merge_content_streams(self : PdfDocument) -> Unit raise PdfError

    PdfDocument::merge_name_trees_no_clash

    fn PdfDocument::merge_name_trees_no_clash(self : PdfDocument, trees : ArrayView[PdfObject]) -> PdfObject

    PdfDocument::merge_number_trees_no_clash

    fn PdfDocument::merge_number_trees_no_clash(self : PdfDocument, trees : ArrayView[PdfObject]) -> PdfObject

    PdfDocument::name_tree_lookup

    fn PdfDocument::name_tree_lookup(self : PdfDocument, key : BytesView, tree : PdfObject) -> PdfObject?

    PdfDocument::name_tree_lookup_object

    fn PdfDocument::name_tree_lookup_object(self : PdfDocument, key : PdfObject, tree : PdfObject) -> PdfObject?

    PdfDocument::number_tree_lookup

    fn PdfDocument::number_tree_lookup(self : PdfDocument, key : Int, tree : PdfObject) -> PdfObject?

    PdfDocument::object_count

    fn PdfDocument::object_count(self : PdfDocument) -> Int

    PdfDocument::object_numbers

    fn PdfDocument::object_numbers(self : PdfDocument) -> Array[Int]

    PdfDocument::page_number_of_target

    fn PdfDocument::page_number_of_target(self : PdfDocument, destination : PdfDestination) -> Int raise PdfError

    PdfDocument::page_object_number

    fn PdfDocument::page_object_number(self : PdfDocument, page_number : Int) -> Int? raise PdfError

    PdfDocument::page_reference_numbers

    fn PdfDocument::page_reference_numbers(self : PdfDocument) -> Array[Int] raise PdfError

    PdfDocument::pages_of_pagetree

    fn PdfDocument::pages_of_pagetree(self : PdfDocument) -> Array[PdfPage] raise PdfError

    PdfDocument::pages_of_pagetree_quick

    fn PdfDocument::pages_of_pagetree_quick(self : PdfDocument) -> Int raise PdfError

    PdfDocument::parse_cmap

    fn PdfDocument::parse_cmap(self : PdfDocument, cmap : PdfObject) -> PdfParsedCMap raise PdfError

    PdfDocument::parse_content_bytes_with_resources

    fn PdfDocument::parse_content_bytes_with_resources(self : PdfDocument, resources : PdfObject, data : Bytes) -> Array[PdfContentOp] raise PdfError

    PdfDocument::parse_content_ops

    fn PdfDocument::parse_content_ops(self : PdfDocument, streams : ArrayView[PdfObject]) -> Array[PdfContentOp] raise PdfError

    PdfDocument::parse_content_ops_with_resources

    fn PdfDocument::parse_content_ops_with_resources(self : PdfDocument, resources : PdfObject, streams : ArrayView[PdfObject]) -> Array[PdfContentOp] raise PdfError

    PdfDocument::parse_content_view_with_resources

    fn PdfDocument::parse_content_view_with_resources(self : PdfDocument, resources : PdfObject, data : BytesView) -> Array[PdfContentOp] raise PdfError

    PdfDocument::parse_function

    fn PdfDocument::parse_function(self : PdfDocument, function_object : PdfObject) -> PdfFunction raise PdfError

    PdfDocument::parse_matrix

    fn PdfDocument::parse_matrix(self : PdfDocument, key : PdfName, object : PdfObject) -> TransformMatrix raise PdfError

    PdfDocument::parse_rectangle

    fn PdfDocument::parse_rectangle(self : PdfDocument, object : PdfObject) -> PdfRectangle raise PdfError

    PdfDocument::parsed_object_entries

    fn PdfDocument::parsed_object_entries(self : PdfDocument) -> Array[(Int, Int, PdfObject)]

    PdfDocument::pdf_decode_stream

    fn PdfDocument::pdf_decode_stream(self : PdfDocument, object : PdfObject) -> PdfObject raise PdfError

    PdfDocument::pdf_decode_stream_until_unknown

    fn PdfDocument::pdf_decode_stream_until_unknown(self : PdfDocument, object : PdfObject) -> PdfObject raise PdfError

    PdfDocument::pdf_decode_streams_until_unknown

    fn PdfDocument::pdf_decode_streams_until_unknown(self : PdfDocument) -> Unit raise PdfError

    PdfDocument::pdf_object_of_function

    fn PdfDocument::pdf_object_of_function(self : PdfDocument, function : PdfFunction) -> PdfObject

    PdfDocument::pdf_of_pages

    fn PdfDocument::pdf_of_pages(self : PdfDocument, page_numbers : ArrayView[Int], retain_numbering? : Bool, process_struct_tree? : Bool) -> PdfDocument raise PdfError

    PdfDocument::permissions

    fn PdfDocument::permissions(self : PdfDocument) -> Array[PdfPermission] raise PdfError

    PdfDocument::postpend_operators

    fn PdfDocument::postpend_operators(self : PdfDocument, page : PdfPage, ops : ArrayView[PdfContentOp], fast? : Bool) -> PdfPage raise PdfError

    PdfDocument::prepend_operators

    fn PdfDocument::prepend_operators(self : PdfDocument, page : PdfPage, ops : ArrayView[PdfContentOp], fast? : Bool) -> PdfPage raise PdfError

    PdfDocument::process_xobjects

    fn PdfDocument::process_xobjects(self : PdfDocument, page : PdfPage, process : (PdfDocument, PdfObject, ArrayView[PdfObject]) -> Array[PdfObject] raise PdfError) -> Unit raise PdfError

    PdfDocument::read_annotation

    fn PdfDocument::read_annotation(self : PdfDocument, annotation : PdfObject) -> PdfAnnotation raise PdfError

    PdfDocument::read_bookmarks

    fn PdfDocument::read_bookmarks(self : PdfDocument, preserve_actions? : Bool) -> Array[PdfBookmark] raise PdfError

    PdfDocument::read_cid_system_info

    fn PdfDocument::read_cid_system_info(self : PdfDocument, dictionary : PdfObject) -> PdfCIDSystemInfo raise PdfError

    PdfDocument::read_cidkeyed_font

    fn PdfDocument::read_cidkeyed_font(self : PdfDocument, font : PdfObject) -> PdfCIDKeyedFont raise PdfError

    PdfDocument::read_colour_space

    fn PdfDocument::read_colour_space(self : PdfDocument, resources : PdfObject, object : PdfObject) -> PdfColourSpace? raise PdfError

    PdfDocument::read_destination

    fn PdfDocument::read_destination(self : PdfDocument, object : PdfObject, shallow? : Bool) -> PdfDestination raise PdfError

    PdfDocument::read_encoding

    fn PdfDocument::read_encoding(self : PdfDocument, font : PdfObject) -> PdfEncoding raise PdfError

    PdfDocument::read_font

    fn PdfDocument::read_font(self : PdfDocument, font : PdfObject) -> PdfFont raise PdfError

    PdfDocument::read_font_descriptor

    fn PdfDocument::read_font_descriptor(self : PdfDocument, font : PdfObject) -> PdfFontDescriptor? raise PdfError

    PdfDocument::read_font_metrics

    fn PdfDocument::read_font_metrics(self : PdfDocument, font : PdfObject) -> Array[Double]? raise PdfError

    PdfDocument::read_name_tree

    fn PdfDocument::read_name_tree(self : PdfDocument, tree : PdfObject) -> Array[(Bytes, PdfObject)]

    PdfDocument::read_number_tree

    fn PdfDocument::read_number_tree(self : PdfDocument, tree : PdfObject) -> Array[(Int, PdfObject)]

    PdfDocument::read_optional_content_groups

    fn PdfDocument::read_optional_content_groups(self : PdfDocument) -> PdfOptionalContent? raise PdfError

    PdfDocument::read_page_labels

    fn PdfDocument::read_page_labels(self : PdfDocument) -> Array[PdfPageLabel] raise PdfError

    PdfDocument::read_simple_font

    fn PdfDocument::read_simple_font(self : PdfDocument, font : PdfObject) -> PdfSimpleFont raise PdfError

    PdfDocument::read_standard14_font

    fn PdfDocument::read_standard14_font(self : PdfDocument, font : PdfObject) -> PdfStandardFontData raise PdfError

    PdfDocument::recrypt_with_password

    fn PdfDocument::recrypt_with_password(self : PdfDocument, password : BytesView) -> PdfDocument raise PdfError

    PdfDocument::recrypt_with_password_aesv2

    fn PdfDocument::recrypt_with_password_aesv2(self : PdfDocument, password : BytesView) -> PdfDocument raise PdfError

    PdfDocument::recrypt_with_password_aesv2_with_iv_provider

    fn PdfDocument::recrypt_with_password_aesv2_with_iv_provider(self : PdfDocument, password : BytesView, iv_provider : (Int, Int, Int) -> Bytes raise PdfError) -> PdfDocument raise PdfError

    PdfDocument::recrypt_with_password_aesv3

    fn PdfDocument::recrypt_with_password_aesv3(self : PdfDocument, password : BytesView) -> PdfDocument raise PdfError

    PdfDocument::recrypt_with_password_aesv3_with_iv_provider

    fn PdfDocument::recrypt_with_password_aesv3_with_iv_provider(self : PdfDocument, password : BytesView, iv_provider : (Int, Int, Int) -> Bytes raise PdfError) -> PdfDocument raise PdfError

    PdfDocument::referenced_object_numbers

    fn PdfDocument::referenced_object_numbers(self : PdfDocument, object : PdfObject, no_follow_entries? : ArrayView[PdfName], no_follow_contains? : ArrayView[(PdfName, PdfObject)]) -> Array[Int]

    PdfDocument::remove_bookmarks

    fn PdfDocument::remove_bookmarks(self : PdfDocument) -> PdfDocument raise PdfError

    PdfDocument::remove_chain

    fn PdfDocument::remove_chain(self : PdfDocument, chain : ArrayView[PdfName]) -> Bool raise PdfError

    PdfDocument::remove_duplicate_fonts

    fn PdfDocument::remove_duplicate_fonts(self : PdfDocument) -> Unit

    PdfDocument::remove_object

    fn PdfDocument::remove_object(self : PdfDocument, number : Int) -> Unit

    PdfDocument::remove_optional_content_groups

    fn PdfDocument::remove_optional_content_groups(self : PdfDocument) -> PdfDocument raise PdfError

    PdfDocument::remove_page_labels

    fn PdfDocument::remove_page_labels(self : PdfDocument) -> PdfDocument raise PdfError

    PdfDocument::remove_unreferenced

    fn PdfDocument::remove_unreferenced(self : PdfDocument) -> Unit raise PdfError

    PdfDocument::renumber_objects

    fn PdfDocument::renumber_objects(self : PdfDocument, changes : ArrayView[(Int, Int)]) -> PdfDocument raise PdfError

    PdfDocument::renumber_objects_by_offset

    fn PdfDocument::renumber_objects_by_offset(self : PdfDocument, offset : Int) -> PdfDocument raise PdfError

    PdfDocument::renumber_objects_compact

    fn PdfDocument::renumber_objects_compact(self : PdfDocument) -> PdfDocument raise PdfError

    PdfDocument::renumber_pages

    fn PdfDocument::renumber_pages(self : PdfDocument, pages : ArrayView[PdfPage]) -> Array[PdfPage] raise PdfError

    PdfDocument::replace_chain

    fn PdfDocument::replace_chain(self : PdfDocument, chain : ArrayView[PdfName], value : PdfObject) -> Unit raise PdfError

    PdfDocument::replace_inherit

    fn PdfDocument::replace_inherit(self : PdfDocument, object_numbers : ArrayView[Int]) -> Unit raise PdfError

    PdfDocument::revision_read

    fn PdfDocument::revision_read(self : PdfDocument) -> Int

    PdfDocument::root

    fn PdfDocument::root(self : PdfDocument) -> Int

    PdfDocument::saved_encryption

    fn PdfDocument::saved_encryption(self : PdfDocument) -> PdfSavedEncryption?

    PdfDocument::select_object_numbers

    fn PdfDocument::select_object_numbers(self : PdfDocument, predicate : (PdfObject) -> Bool) -> Array[Int]

    PdfDocument::set_first_xref

    fn PdfDocument::set_first_xref(self : PdfDocument, first_xref : Int) -> Unit

    PdfDocument::set_revision_read

    fn PdfDocument::set_revision_read(self : PdfDocument, revision_read : Int) -> Unit

    PdfDocument::set_root

    fn PdfDocument::set_root(self : PdfDocument, root : Int) -> Unit

    PdfDocument::set_saved_encryption

    fn PdfDocument::set_saved_encryption(self : PdfDocument, saved_encryption : PdfSavedEncryption?) -> Unit

    PdfDocument::set_trailer_dict

    fn PdfDocument::set_trailer_dict(self : PdfDocument, trailer_dict : PdfObject) -> Unit

    PdfDocument::set_version

    fn PdfDocument::set_version(self : PdfDocument, major : Int, minor : Int) -> Unit

    PdfDocument::set_was_linearized

    fn PdfDocument::set_was_linearized(self : PdfDocument, was_linearized : Bool) -> Unit

    PdfDocument::shortest_unused_prefix

    fn PdfDocument::shortest_unused_prefix(self : PdfDocument) -> String

    PdfDocument::stream_object_entries

    fn PdfDocument::stream_object_entries(self : PdfDocument) -> Array[(Int, Int, PdfStream)]

    PdfDocument::target_of_page_number

    fn PdfDocument::target_of_page_number(self : PdfDocument, page_number : Int) -> PdfDestination raise PdfError

    PdfDocument::text_extractor_of_font

    fn PdfDocument::text_extractor_of_font(self : PdfDocument, font : PdfObject) -> PdfTextExtractor raise PdfError

    PdfDocument::trailer_dict

    fn PdfDocument::trailer_dict(self : PdfDocument) -> PdfObject

    PdfDocument::transform_annotations

    fn PdfDocument::transform_annotations(self : PdfDocument, matrix : TransformMatrix, rest : PdfObject) -> Unit raise PdfError

    PdfDocument::transform_bookmark

    fn PdfDocument::transform_bookmark(self : PdfDocument, matrix : TransformMatrix, bookmark : PdfBookmark) -> PdfBookmark raise PdfError

    PdfDocument::transform_destination

    fn PdfDocument::transform_destination(self : PdfDocument, matrix : TransformMatrix, destination : PdfDestination) -> PdfDestination raise PdfError

    PdfDocument::transform_quadpoints

    fn PdfDocument::transform_quadpoints(self : PdfDocument, matrix : TransformMatrix, object : PdfObject) -> PdfObject

    PdfDocument::transform_rect

    fn PdfDocument::transform_rect(self : PdfDocument, matrix : TransformMatrix, object : PdfObject) -> PdfObject raise PdfError

    PdfDocument::trim_structure_tree

    fn PdfDocument::trim_structure_tree(self : PdfDocument, page_numbers : ArrayView[Int]) -> Unit raise PdfError

    PdfDocument::version

    fn PdfDocument::version(self : PdfDocument) -> (Int, Int)

    PdfDocument::was_linearized

    fn PdfDocument::was_linearized(self : PdfDocument) -> Bool

    PdfDocument::what_encryption

    fn PdfDocument::what_encryption(self : PdfDocument) -> PdfEncryptionMethod? raise PdfError

    PdfDocument::write_colour_space

    fn PdfDocument::write_colour_space(_self : PdfDocument, space : PdfColourSpace) -> PdfObject

    PdfDocument::write_encoding

    fn PdfDocument::write_encoding(self : PdfDocument, encoding : PdfEncoding) -> Int raise PdfError

    PdfDocument::write_font

    fn PdfDocument::write_font(self : PdfDocument, font : PdfFont, objnum? : Int?) -> Int raise PdfError

    PdfDocument::write_optional_content_groups

    fn PdfDocument::write_optional_content_groups(self : PdfDocument, optional_content : PdfOptionalContent) -> PdfDocument raise PdfError

    PdfDocument::write_page_labels

    fn PdfDocument::write_page_labels(self : PdfDocument, labels : ArrayView[PdfPageLabel]) -> PdfDocument raise PdfError

    PdfEncoding

    pub(all) enum PdfEncoding {
    PdfImplicitInFontFile
    PdfStandardEncoding
    PdfMacRomanEncoding
    PdfWinAnsiEncoding
    PdfMacExpertEncoding
    PdfCustomEncoding(PdfEncoding, Array[PdfEncodingDifference])
    PdfFillUndefinedWithStandard(PdfEncoding)
    } derive(Eq, ToJson,
    Debug
    )

    PdfEncoding::debug_name

    fn PdfEncoding::debug_name(self : PdfEncoding) -> String

    PdfEncoding::pdf_name

    fn PdfEncoding::pdf_name(self : PdfEncoding) -> PdfName?

    PdfEncoding::reverse_table

    fn PdfEncoding::reverse_table(self : PdfEncoding) -> Array[(PdfName, Int)]

    PdfEncoding::table

    fn PdfEncoding::table(self : PdfEncoding) -> Array[(Int, PdfName)]

    PdfEncodingDifference

    pub(all) struct PdfEncodingDifference {
    name : PdfName
    code : Int
    } derive(Eq, ToJson,
    Debug
    )

    PdfEncryptionMethod

    pub(all) enum PdfEncryptionMethod {
    PdfEncryption40Bit
    PdfEncryption128Bit
    PdfEncryptionAES128(Bool)
    PdfEncryptionAES256(Bool)
    PdfEncryptionAES256ISO(Bool)
    PdfEncryptionAlreadyEncrypted
    } derive(Eq, ToJson,
    Debug
    )

    PdfEncryptionValues

    pub(all) struct PdfEncryptionValues {
    crypt_type : PdfCryptType
    user_entry : Bytes
    owner_entry : Bytes
    permissions : Int
    file_id : Bytes
    encrypt_metadata : Bool
    permissions_entry : Bytes?
    user_encryption_key : Bytes?
    owner_encryption_key : Bytes?
    } derive(Eq, ToJson,
    Debug
    )

    PdfEncryptionValues::authenticate_owner_password

    fn PdfEncryptionValues::authenticate_owner_password(self : PdfEncryptionValues, password : BytesView, no_encrypt_metadata? : Bool) -> Bool raise PdfError

    PdfEncryptionValues::authenticate_user_password

    fn PdfEncryptionValues::authenticate_user_password(self : PdfEncryptionValues, password : BytesView, no_encrypt_metadata? : Bool) -> Bool raise PdfError

    PdfEncryptionValues::file_key_for_owner_password

    fn PdfEncryptionValues::file_key_for_owner_password(self : PdfEncryptionValues, password : BytesView, no_encrypt_metadata? : Bool) -> Bytes? raise PdfError

    PdfEncryptionValues::file_key_for_user_password

    fn PdfEncryptionValues::file_key_for_user_password(self : PdfEncryptionValues, password : BytesView, no_encrypt_metadata? : Bool) -> Bytes? raise PdfError

    PdfFont

    pub(all) enum PdfFont {
    PdfFontStandard(PdfStandardFontData)
    PdfFontSimple(PdfSimpleFont)
    PdfFontCIDKeyed(PdfCIDKeyedFont)
    } derive(Eq, ToJson,
    Debug
    )

    PdfFont::debug_name

    fn PdfFont::debug_name(self : PdfFont) -> String

    PdfFont::is_identity_h

    fn PdfFont::is_identity_h(self : PdfFont) -> Bool

    PdfFont::is_identity_v

    fn PdfFont::is_identity_v(self : PdfFont) -> Bool

    PdfFont::text_extractor

    fn PdfFont::text_extractor(self : PdfFont) -> PdfTextExtractor

    PdfFont::uses_two_byte_codes

    fn PdfFont::uses_two_byte_codes(self : PdfFont) -> Bool

    PdfFontDescriptor

    pub(all) struct PdfFontDescriptor {
    ascent : Double
    descent : Double
    avgwidth : Double
    maxwidth : Double
    flags : Int
    fontbbox : PdfRectangle
    italicangle : Double
    capheight : Double
    xheight : Double
    stemv : Double
    fontfile : PdfFontFile?
    charset : Array[PdfName]?
    tounicode : Array[(Int, Bytes)]?
    } derive(Eq, ToJson,
    Debug
    )

    PdfFontFile

    pub(all) enum PdfFontFile {
    PdfFontFile(Int)
    PdfFontFile2(Int)
    PdfFontFile3(Int)
    } derive(Eq, ToJson,
    Debug
    )

    PdfFunction

    pub(all) struct PdfFunction {
    func : PdfFunctionKind
    domain : Array[Double]
    range : Array[Double]?
    } derive(Eq, ToJson,
    Debug
    )

    PdfFunction::debug_string

    fn PdfFunction::debug_string(self : PdfFunction) -> String

    PdfFunction::eval

    fn PdfFunction::eval(self : PdfFunction, inputs : ArrayView[Double]) -> Array[Double] raise PdfError

    PdfFunctionKind

    pub(all) enum PdfFunctionKind {
    PdfFunctionSampled(PdfSampledFunction)
    PdfFunctionInterpolation(PdfInterpolationFunction)
    PdfFunctionStitching(PdfStitchingFunction)
    PdfFunctionCalculator(PdfCalculatorFunction)
    } derive(Eq, ToJson,
    Debug
    )

    PdfImage

    pub(all) enum PdfImage {
    PdfJPEG(Bytes, Array[Double]?)
    PdfJPEG2000(Bytes, Array[Double]?)
    PdfJBIG2(Bytes, Array[Double]?, Int?)
    PdfRawImage(Int, Int, PdfPixelLayout, Bytes)
    } derive(Eq, ToJson,
    Debug
    )

    PdfInterpolationFunction

    pub(all) struct PdfInterpolationFunction {
    c0 : Array[Double]
    c1 : Array[Double]
    n : Double
    } derive(Eq, ToJson,
    Debug
    )

    PdfLexeme

    pub(all) enum PdfLexeme {
    LexNull
    LexBool(Bool)
    LexInt(Int)
    LexReal(Double)
    LexString(Bytes)
    LexName(PdfName)
    LexLeftSquare
    LexRightSquare
    LexLeftDict
    LexRightDict
    LexStream(PdfStreamData)
    LexEndStream
    LexObj
    LexEndObj
    LexR
    LexComment(Bytes)
    StopLexing
    LexNone
    } derive(Eq, ToJson,
    Debug
    )

    PdfName

    pub(all) struct PdfName(Bytes) derive(Eq, ToJson,
    Debug
    )

    PdfName::byte_length

    fn PdfName::byte_length(self : PdfName) -> Int

    PdfName::bytes

    fn PdfName::bytes(self : PdfName) -> Bytes

    PdfName::view

    fn PdfName::view(self : PdfName) -> BytesView

    PdfObject

    pub(all) enum PdfObject {
    PdfNull
    PdfBoolean(Bool)
    PdfInteger(Int)
    PdfReal(Double)
    PdfString(Bytes)
    PdfNameObject(PdfName)
    PdfArray(Array[PdfObject])
    PdfDictionary(Array[(PdfName, PdfObject)])
    PdfStreamObject(PdfStream)
    PdfIndirect(Int)
    } derive(Eq, ToJson,
    Debug
    )

    PdfObject::add_dict_entry

    fn PdfObject::add_dict_entry(self : PdfObject, key : PdfName, value : PdfObject) -> PdfObject raise PdfError

    PdfObject::dictionary_view

    fn PdfObject::dictionary_view(self : PdfObject) -> ArrayView[(PdfName, PdfObject)]?

    PdfObject::find_indirect

    fn PdfObject::find_indirect(self : PdfObject, key : PdfName) -> Int? raise PdfError

    PdfObject::get_stream

    fn PdfObject::get_stream(self : PdfObject) -> Unit raise PdfError

    PdfObject::lookup_immediate

    fn PdfObject::lookup_immediate(self : PdfObject, key : PdfName) -> PdfObject?

    PdfObject::remove_dict_entry

    fn PdfObject::remove_dict_entry(self : PdfObject, key : PdfName) -> PdfObject raise PdfError

    PdfObject::replace_dict_entry

    fn PdfObject::replace_dict_entry(self : PdfObject, key : PdfName, value : PdfObject) -> PdfObject raise PdfError

    PdfObject::stream_bytes

    fn PdfObject::stream_bytes(self : PdfObject) -> Bytes raise PdfError

    PdfObject::unique_key

    fn PdfObject::unique_key(self : PdfObject, prefix : String) -> PdfName raise PdfError

    PdfObjectData

    pub(all) enum PdfObjectData {
    ObjectParsed(PdfObject)
    ObjectParsedAlreadyDecrypted(PdfObject)
    ObjectToParse
    ObjectToParseFromObjectStream(ObjectStreamReference)
    } derive(Eq, ToJson,
    Debug
    )

    PdfObjectEntry

    pub(all) struct PdfObjectEntry {
    data : PdfObjectData
    generation : Int
    } derive(Eq, ToJson,
    Debug
    )

    PdfObjectEvent

    pub(all) enum PdfObjectEvent {
    ObjectAltered
    ObjectDeleted
    } derive(Eq, ToJson,
    Debug
    )

    PdfObjectMap

    PdfObjectMap::contains

    fn PdfObjectMap::contains(self : PdfObjectMap, number : Int) -> Bool

    PdfObjectMap::get_entry

    fn PdfObjectMap::get_entry(self : PdfObjectMap, number : Int) -> PdfObjectEntry?

    PdfObjectMap::length

    fn PdfObjectMap::length(self : PdfObjectMap) -> Int

    PdfObjectMap::lookup_parsed_or_null

    fn PdfObjectMap::lookup_parsed_or_null(self : PdfObjectMap, number : Int) -> PdfObject

    PdfObjectMap::object_numbers

    fn PdfObjectMap::object_numbers(self : PdfObjectMap) -> Array[Int]

    PdfObjectMap::remove

    fn PdfObjectMap::remove(self : PdfObjectMap, number : Int) -> Unit

    PdfObjectMap::set_entry

    fn PdfObjectMap::set_entry(self : PdfObjectMap, number : Int, entry : PdfObjectEntry) -> Unit

    PdfObjects

    pub struct PdfObjects {
    max_object_number : Int
    object_map : PdfObjectMap
    object_stream_ids :
    HashMap
    [Int, Int]
    log : Array[(Int, PdfObjectEvent)]
    } derive(Eq, ToJson,
    Debug
    )

    PdfObjects::add_object

    fn PdfObjects::add_object(self : PdfObjects, object : PdfObject, generation? : Int) -> Int

    PdfObjects::add_object_given_number

    fn PdfObjects::add_object_given_number(self : PdfObjects, number : Int, object : PdfObject, generation? : Int) -> Unit

    PdfObjects::get_entry

    fn PdfObjects::get_entry(self : PdfObjects, number : Int) -> PdfObjectEntry?

    PdfObjects::length

    fn PdfObjects::length(self : PdfObjects) -> Int

    PdfObjects::log

    fn PdfObjects::log(self : PdfObjects) -> Array[(Int, PdfObjectEvent)]

    PdfObjects::lookup_object_or_null

    fn PdfObjects::lookup_object_or_null(self : PdfObjects, number : Int) -> PdfObject

    PdfObjects::map_objects_in_place

    fn PdfObjects::map_objects_in_place(self : PdfObjects, transform : (PdfObject) -> PdfObject) -> Unit

    PdfObjects::max_object_number

    fn PdfObjects::max_object_number(self : PdfObjects) -> Int

    PdfObjects::object_numbers

    fn PdfObjects::object_numbers(self : PdfObjects) -> Array[Int]

    PdfObjects::parsed_entries

    fn PdfObjects::parsed_entries(self : PdfObjects) -> Array[(Int, Int, PdfObject)]

    PdfObjects::remove_object

    fn PdfObjects::remove_object(self : PdfObjects, number : Int) -> Unit

    PdfObjects::set_entry

    fn PdfObjects::set_entry(self : PdfObjects, number : Int, entry : PdfObjectEntry) -> Unit

    PdfObjects::stream_entries

    fn PdfObjects::stream_entries(self : PdfObjects) -> Array[(Int, Int, PdfStream)]

    PdfOcg

    pub(all) struct PdfOcg {
    name : Bytes
    intent : Array[PdfName]
    usage : PdfOcgUsage?
    } derive(Eq, ToJson,
    Debug
    )

    PdfOcgAppDict

    pub(all) struct PdfOcgAppDict {
    event : PdfOcgEvent
    ocgs : Array[Int]
    category : Array[PdfName]
    } derive(Eq, ToJson,
    Debug
    )

    PdfOcgConfig

    pub(all) struct PdfOcgConfig {
    name : Bytes?
    creator : Bytes?
    base_state : PdfOcgState
    on : Array[Int]
    off : Array[Int]
    intent : Array[PdfName]
    usage_applications : Array[PdfOcgAppDict]
    order : Array[(Bytes?, Array[Int])]?
    list_mode : PdfOcgListMode
    radio_button_groups : Array[Array[Int]]?
    locked : Array[Int]
    } derive(Eq, ToJson,
    Debug
    )

    PdfOcgEvent

    pub(all) enum PdfOcgEvent {
    OcgView
    OcgPrint
    OcgExport
    } derive(Eq, ToJson,
    Debug
    )

    PdfOcgListMode

    pub(all) enum PdfOcgListMode {
    OcgAllPages
    OcgVisiblePages
    } derive(Eq, ToJson,
    Debug
    )

    PdfOcgState

    pub(all) enum PdfOcgState {
    OcgOn
    OcgOff
    OcgUnchanged
    } derive(Eq, ToJson,
    Debug
    )

    PdfOcgUsage

    pub(all) struct PdfOcgUsage {
    creator_info : (Bytes, PdfName)?
    language : (Bytes, PdfName?)?
    export_state : PdfName?
    zoom_min : Double?
    zoom_max : Double?
    print_subtype : PdfName?
    print_state : PdfName?
    view_state : PdfName?
    user : (PdfName, Array[Bytes])?
    page_element_subtype : PdfName?
    } derive(Eq, ToJson,
    Debug
    )

    PdfOptionalContent

    pub(all) struct PdfOptionalContent {
    ocgs : Array[(Int, PdfOcg)]
    default_config : PdfOcgConfig
    configs : Array[PdfOcgConfig]
    } derive(Eq, ToJson,
    Debug
    )

    PdfPage

    pub(all) struct PdfPage {
    content : Array[PdfObject]
    mediabox : PdfObject
    resources : PdfObject
    rotate : PdfPageRotation
    rest : PdfObject
    } derive(Eq, ToJson,
    Debug
    )

    PdfPageLabel

    pub(all) struct PdfPageLabel {
    label_style : PdfPageLabelStyle
    label_prefix : Bytes?
    start_page : Int
    start_value : Int
    } derive(Eq, ToJson,
    Debug
    )

    PdfPageLabelStyle

    pub(all) enum PdfPageLabelStyle {
    PageLabelDecimalArabic
    PageLabelUppercaseRoman
    PageLabelLowercaseRoman
    PageLabelUppercaseLetters
    PageLabelLowercaseLetters
    PageLabelNoLabelPrefixOnly
    } derive(Eq, ToJson,
    Debug
    )

    PdfPageLabelStyle::debug_name

    fn PdfPageLabelStyle::debug_name(self : PdfPageLabelStyle) -> String

    PdfPageRotation

    pub(all) enum PdfPageRotation {
    Rotate0
    Rotate90
    Rotate180
    Rotate270
    } derive(Eq, ToJson,
    Debug
    )

    PdfParsedCMap

    pub(all) struct PdfParsedCMap {
    map : Array[(Int, Bytes)]
    cid_map : Array[(Int, Int)]
    notdef_map : Array[(Int, Int)]
    codespaces : Array[PdfCMapCodeSpace]
    usecmap : PdfName?
    wmode : Int?
    cmap_name : PdfName?
    cmap_type : Int?
    cid_system_info : PdfCIDSystemInfo?
    } derive(Eq, ToJson,
    Debug
    )

    PdfParsedIndirectObject

    pub(all) struct PdfParsedIndirectObject {
    number : Int
    generation : Int
    object : PdfObject
    } derive(Eq, ToJson,
    Debug
    )

    PdfPermission

    pub(all) enum PdfPermission {
    PdfNoEdit
    PdfNoPrint
    PdfNoCopy
    PdfNoAnnot
    PdfNoForms
    PdfNoExtract
    PdfNoAssemble
    PdfNoHqPrint
    } derive(Eq, ToJson,
    Debug
    )

    PdfPixelLayout

    pub(all) enum PdfPixelLayout {
    PdfBPP1
    PdfBPP8
    PdfBPP24
    PdfBPP48
    } derive(Eq, ToJson,
    Debug
    )

    PdfRectangle

    pub(all) struct PdfRectangle {
    min_x : Double
    min_y : Double
    max_x : Double
    max_y : Double
    } derive(Eq, ToJson,
    Debug
    )

    PdfSampledFunction

    pub(all) struct PdfSampledFunction {
    size : Array[Int]
    order : Int
    encode : Array[Double]
    decode : Array[Double]
    bits_per_sample : Int
    samples : Array[Int]
    } derive(Eq, ToJson,
    Debug
    )

    PdfSavedEncryption

    pub(all) struct PdfSavedEncryption {
    values : PdfEncryptionValues
    } derive(Eq, ToJson,
    Debug
    )

    PdfSimpleFont

    pub(all) struct PdfSimpleFont {
    fonttype : PdfSimpleFontType
    basefont : PdfName?
    firstchar : Int
    lastchar : Int
    widths : Array[Int]
    fontdescriptor : PdfFontDescriptor?
    fontmetrics : Array[Double]?
    encoding : PdfEncoding
    } derive(Eq, ToJson,
    Debug
    )

    PdfSimpleFont::debug_name

    fn PdfSimpleFont::debug_name(self : PdfSimpleFont) -> String

    PdfSimpleFontType

    pub(all) enum PdfSimpleFontType {
    PdfType1
    PdfMMType1
    PdfType3(PdfType3Glyphs)
    PdfTrueType
    } derive(Eq, ToJson,
    Debug
    )

    PdfSimpleFontType::debug_name

    fn PdfSimpleFontType::debug_name(self : PdfSimpleFontType) -> String

    PdfStandardFont

    pub(all) enum PdfStandardFont {
    PdfTimesRoman
    PdfTimesBold
    PdfTimesItalic
    PdfTimesBoldItalic
    PdfHelvetica
    PdfHelveticaBold
    PdfHelveticaOblique
    PdfHelveticaBoldOblique
    PdfCourier
    PdfCourierBold
    PdfCourierOblique
    PdfCourierBoldOblique
    PdfSymbol
    PdfZapfDingbats
    } derive(Eq, ToJson,
    Debug
    )

    PdfStandardFont::afm_data

    PdfStandardFont::baseline_adjustment

    fn PdfStandardFont::baseline_adjustment(self : PdfStandardFont) -> Int

    PdfStandardFont::flags

    fn PdfStandardFont::flags(self : PdfStandardFont) -> Int

    PdfStandardFont::name

    fn PdfStandardFont::name(self : PdfStandardFont) -> String

    PdfStandardFont::pdf_name

    fn PdfStandardFont::pdf_name(self : PdfStandardFont) -> PdfName

    PdfStandardFont::stemv

    fn PdfStandardFont::stemv(self : PdfStandardFont) -> Int

    PdfStandardFont::text_width

    fn PdfStandardFont::text_width(self : PdfStandardFont, encoding : PdfEncoding, text : BytesView, kern? : Bool) -> Int

    PdfStandardFontData

    pub(all) struct PdfStandardFontData {
    font : PdfStandardFont
    encoding : PdfEncoding
    } derive(Eq, ToJson,
    Debug
    )

    PdfStandardFontData::debug_name

    fn PdfStandardFontData::debug_name(self : PdfStandardFontData) -> String

    PdfStandardFontData::text_width

    fn PdfStandardFontData::text_width(self : PdfStandardFontData, text : BytesView, kern? : Bool) -> Int

    PdfStitchingFunction

    pub(all) struct PdfStitchingFunction {
    functions : Array[PdfFunction]
    bounds : Array[Double]
    stitch_encode : Array[Double]
    } derive(Eq, ToJson,
    Debug
    )

    PdfStream

    pub(all) struct PdfStream {
    dictionary : PdfObject
    data : PdfStreamData
    } derive(Eq, ToJson,
    Debug
    )

    PdfStreamData

    pub(all) enum PdfStreamData {
    StreamGot(Bytes)
    StreamToGet(ToGet)
    } derive(Eq, ToJson,
    Debug
    )

    PdfStreamDataCrypt

    pub(all) enum PdfStreamDataCrypt {
    PdfStreamDataNoCrypt
    PdfStreamDataArc4Decrypt(Int, Int, Bytes, Int)
    PdfStreamDataAesV2Decrypt(Int, Int, Bytes, Int)
    PdfStreamDataAesV3Decrypt(Bytes)
    } derive(Eq, ToJson,
    Debug
    )

    PdfStreamEncoding

    pub(all) enum PdfStreamEncoding {
    PdfStreamASCIIHex
    PdfStreamASCII85
    PdfStreamRunLength
    PdfStreamFlate
    PdfStreamCCITT(Int, Int)
    PdfStreamCCITTG4(Int, Int)
    } derive(Eq, ToJson,
    Debug
    )

    PdfStreamEncoding::filter_name

    fn PdfStreamEncoding::filter_name(self : PdfStreamEncoding) -> PdfName

    PdfStreamPredictor

    pub(all) enum PdfStreamPredictor {
    PdfStreamPredictorTIFF2
    PdfStreamPredictorPNGNone
    PdfStreamPredictorPNGSub
    PdfStreamPredictorPNGUp
    PdfStreamPredictorPNGAverage
    PdfStreamPredictorPNGPaeth
    PdfStreamPredictorPNGOptimum
    } derive(Eq, ToJson,
    Debug
    )

    PdfStreamPredictor::number

    fn PdfStreamPredictor::number(self : PdfStreamPredictor) -> Int

    PdfTargetPage

    pub(all) enum PdfTargetPage {
    TargetPageObject(Int)
    TargetOtherDocPageNumber(Int)
    } derive(Eq, ToJson,
    Debug
    )

    PdfTextExtractor

    pub(all) struct PdfTextExtractor {
    font : PdfFont
    } derive(Eq, ToJson,
    Debug
    )

    PdfTextExtractor::charcode_of_codepoint

    fn PdfTextExtractor::charcode_of_codepoint(self : PdfTextExtractor, codepoint : Int) -> Int?

    PdfTextExtractor::codepoints_of_text

    fn PdfTextExtractor::codepoints_of_text(self : PdfTextExtractor, text : BytesView) -> Array[Int] raise PdfError

    PdfTextExtractor::glyphnames_and_codepoints_of_text

    fn PdfTextExtractor::glyphnames_and_codepoints_of_text(self : PdfTextExtractor, text : BytesView) -> Array[PdfTextGlyph] raise PdfError

    PdfTextExtractor::glyphnames_of_text

    fn PdfTextExtractor::glyphnames_of_text(self : PdfTextExtractor, text : BytesView) -> Array[PdfName] raise PdfError

    PdfTextGlyph

    pub(all) struct PdfTextGlyph {
    glyphname : PdfName
    codepoints : Array[Int]
    } derive(Eq, ToJson,
    Debug
    )

    PdfTristimulusPoint

    pub(all) struct PdfTristimulusPoint {
    x : Double
    y : Double
    z : Double
    } derive(Eq, ToJson,
    Debug
    )

    PdfType3Glyphs

    pub(all) struct PdfType3Glyphs {
    fontbbox : PdfRectangle
    fontmatrix : TransformMatrix
    charprocs : Array[(PdfName, PdfObject)]
    resources : PdfObject
    } derive(Eq, ToJson,
    Debug
    )

    PdfUnit

    pub(all) enum PdfUnit {
    PdfPoint
    Inch
    Centimetre
    Millimetre
    } derive(Eq, ToJson,
    Debug
    )

    PdfVersion

    pub(all) struct PdfVersion {
    major : Int
    minor : Int
    } derive(Eq, ToJson,
    Debug
    )

    PdfWriteEncryption

    pub(all) struct PdfWriteEncryption {
    encryption_method : PdfEncryptionMethod
    user_password : Bytes
    owner_password : Bytes
    denied_permissions : Array[PdfPermission]
    } derive(Eq, ToJson,
    Debug
    )

    PdfWriteMode

    pub(all) enum PdfWriteMode {
    PdfWriteClassic
    PdfWriteXRefStream
    PdfWriteCompressedXRefStream
    } derive(Eq, ToJson,
    Debug
    )

    Point2

    pub(all) struct Point2 {
    x : Double
    y : Double
    } derive(Eq, ToJson,
    Debug
    )

    ToGet

    pub(all) struct ToGet {
    input : ByteCursor
    position : Int
    length : Int
    crypt : PdfStreamDataCrypt
    } derive(Eq, ToJson,
    Debug
    )

    ToGet::crypt

    fn ToGet::crypt(self : ToGet) -> PdfStreamDataCrypt

    ToGet::input

    fn ToGet::input(self : ToGet) -> ByteCursor

    ToGet::length

    fn ToGet::length(self : ToGet) -> Int

    ToGet::position

    fn ToGet::position(self : ToGet) -> Int

    TransformDecomposition

    pub(all) struct TransformDecomposition {
    scale : Double
    aspect : Double
    rotation : Double
    shear : Double
    translate_x : Double
    translate_y : Double
    } derive(Eq, ToJson,
    Debug
    )

    TransformMatrix

    pub(all) struct TransformMatrix {
    a : Double
    b : Double
    c : Double
    d : Double
    e : Double
    f : Double
    } derive(Eq, ToJson,
    Debug
    )

    TransformMatrix::apply

    fn TransformMatrix::apply(self : TransformMatrix, point : Point2) -> Point2

    TransformMatrix::debug_string

    fn TransformMatrix::debug_string(self : TransformMatrix) -> String

    TransformMatrix::decompose

    TransformMatrix::invert

    TransformOp

    pub(all) enum TransformOp {
    Scale(Point2, Double, Double)
    Rotate(Point2, Double)
    Translate(Double, Double)
    ShearX(Point2, Double)
    ShearY(Point2, Double)
    } derive(Eq, ToJson,
    Debug
    )

    TransformOp::debug_string

    fn TransformOp::debug_string(self : TransformOp) -> String

    bit_writer_new

    fn bit_writer_new() -> BitWriter

    bitstream_of_bytes

    fn bitstream_of_bytes(data : Bytes, source? : String) -> BitStream

    bitstream_of_cursor

    fn bitstream_of_cursor(input : ByteCursor) -> BitStream

    bitstream_of_view

    fn bitstream_of_view(data : BytesView, source? : String) -> BitStream

    byte_cursor_of_bytes

    fn byte_cursor_of_bytes(data : Bytes, source? : String) -> ByteCursor

    byte_cursor_of_view

    fn byte_cursor_of_view(data : BytesView, source? : String) -> ByteCursor

    byte_output_new

    fn byte_output_new(initial_size? : Int) -> ByteOutput raise PdfError

    paper_a0

    let paper_a0 : PaperSize

    paper_a1

    let paper_a1 : PaperSize

    paper_a10

    let paper_a10 : PaperSize

    paper_a2

    let paper_a2 : PaperSize

    paper_a3

    let paper_a3 : PaperSize

    paper_a4

    let paper_a4 : PaperSize

    paper_a5

    let paper_a5 : PaperSize

    paper_a6

    let paper_a6 : PaperSize

    paper_a7

    let paper_a7 : PaperSize

    paper_a8

    let paper_a8 : PaperSize

    paper_a9

    let paper_a9 : PaperSize

    paper_size_make

    fn paper_size_make(unit : PdfUnit, width : Double, height : Double) -> PaperSize

    paper_uslegal

    let paper_uslegal : PaperSize

    paper_usletter

    let paper_usletter : PaperSize

    pdf_add_annotation

    fn pdf_add_annotation(document : PdfDocument, page : PdfPage, annotation : PdfAnnotation) -> PdfPage raise PdfError

    pdf_add_bookmarks

    fn pdf_add_bookmarks(bookmarks : ArrayView[PdfBookmark], document : PdfDocument) -> PdfDocument raise PdfError

    pdf_add_pagetree

    fn pdf_add_pagetree(pages : ArrayView[PdfPage], document : PdfDocument) -> (PdfDocument, Int) raise PdfError

    pdf_add_prefix

    fn pdf_add_prefix(document : PdfDocument, prefix : String) -> Unit raise PdfError

    pdf_add_root

    fn pdf_add_root(page_root_number : Int, extras : ArrayView[(PdfName, PdfObject)], document : PdfDocument) -> PdfDocument raise PdfError

    pdf_aes_cbc_decrypt

    fn pdf_aes_cbc_decrypt(key : BytesView, data : BytesView, remove_padding? : Bool) -> Bytes raise PdfError

    pdf_aes_cbc_encrypt_with_iv

    fn pdf_aes_cbc_encrypt_with_iv(key : BytesView, iv : BytesView, data : BytesView) -> Bytes raise PdfError

    pdf_aes_decrypt_block

    fn pdf_aes_decrypt_block(key : BytesView, block : BytesView) -> Bytes raise PdfError

    pdf_aes_ecb_decrypt

    fn pdf_aes_ecb_decrypt(key : BytesView, data : BytesView, remove_padding? : Bool) -> Bytes raise PdfError

    pdf_aes_ecb_encrypt

    fn pdf_aes_ecb_encrypt(key : BytesView, data : BytesView) -> Bytes raise PdfError

    pdf_aes_encrypt_block

    fn pdf_aes_encrypt_block(key : BytesView, block : BytesView) -> Bytes raise PdfError

    pdf_aesv2_decrypt_object_data

    fn pdf_aesv2_decrypt_object_data(object_number : Int, generation : Int, file_key : BytesView, key_length_bits : Int, data : BytesView) -> Bytes raise PdfError

    pdf_aesv2_decrypt_pdf_object

    fn pdf_aesv2_decrypt_pdf_object(object_number : Int, generation : Int, file_key : BytesView, key_length_bits : Int, object : PdfObject, no_encrypt_metadata? : Bool) -> PdfObject raise PdfError

    pdf_aesv2_encrypt_object_data

    fn pdf_aesv2_encrypt_object_data(object_number : Int, generation : Int, file_key : BytesView, key_length_bits : Int, data : BytesView, iv : BytesView) -> Bytes raise PdfError

    pdf_aesv2_encrypt_pdf_object_with_iv_provider

    fn pdf_aesv2_encrypt_pdf_object_with_iv_provider(object_number : Int, generation : Int, file_key : BytesView, key_length_bits : Int, object : PdfObject, iv_provider : (Int) -> Bytes raise PdfError, no_encrypt_metadata? : Bool) -> PdfObject raise PdfError

    pdf_aesv3_decrypt_object_data

    fn pdf_aesv3_decrypt_object_data(file_key : BytesView, data : BytesView) -> Bytes raise PdfError

    pdf_aesv3_decrypt_pdf_object

    fn pdf_aesv3_decrypt_pdf_object(file_key : BytesView, object : PdfObject, no_encrypt_metadata? : Bool) -> PdfObject raise PdfError

    pdf_aesv3_encrypt_object_data

    fn pdf_aesv3_encrypt_object_data(file_key : BytesView, data : BytesView, iv : BytesView) -> Bytes raise PdfError

    pdf_aesv3_encrypt_pdf_object_with_iv_provider

    fn pdf_aesv3_encrypt_pdf_object_with_iv_provider(file_key : BytesView, object : PdfObject, iv_provider : (Int) -> Bytes raise PdfError, no_encrypt_metadata? : Bool) -> PdfObject raise PdfError

    pdf_annotation_make

    fn pdf_annotation_make(subtype : PdfAnnotationSubtype, contents? : Bytes?, border? : PdfAnnotationBorder, rectangle? : PdfRectangle, colour? : PdfAnnotationColour?, subject? : Bytes?) -> PdfAnnotation

    pdf_annotation_make_border

    fn pdf_annotation_make_border(width : Double, vertical_radius? : Double, horizontal_radius? : Double, style? : PdfAnnotationStyle, dash_array? : ArrayView[Int]) -> PdfAnnotationBorder

    pdf_annotations_of_page

    fn pdf_annotations_of_page(document : PdfDocument, page : PdfPage) -> Array[PdfAnnotation] raise PdfError

    pdf_arc4_crypt

    fn pdf_arc4_crypt(key : BytesView, data : BytesView) -> Bytes raise PdfError

    pdf_arc4_crypt_object

    fn pdf_arc4_crypt_object(object_number : Int, generation : Int, file_key : BytesView, key_length_bits : Int, data : BytesView) -> Bytes raise PdfError

    pdf_arc4_crypt_pdf_object

    fn pdf_arc4_crypt_pdf_object(object_number : Int, generation : Int, file_key : BytesView, key_length_bits : Int, object : PdfObject, no_encrypt_metadata? : Bool) -> PdfObject raise PdfError

    pdf_array

    fn pdf_array(values : ArrayView[PdfObject]) -> PdfObject

    pdf_ascii85_decode

    fn pdf_ascii85_decode(data : Bytes) -> Bytes raise PdfError

    pdf_ascii85_decode_view

    fn pdf_ascii85_decode_view(data : BytesView) -> Bytes raise PdfError

    pdf_ascii85_encode

    fn pdf_ascii85_encode(data : Bytes) -> Bytes

    pdf_ascii85_encode_view

    fn pdf_ascii85_encode_view(data : BytesView) -> Bytes

    pdf_ascii_hex_decode

    fn pdf_ascii_hex_decode(data : Bytes) -> Bytes raise PdfError

    pdf_ascii_hex_decode_view

    fn pdf_ascii_hex_decode_view(data : BytesView) -> Bytes raise PdfError

    pdf_ascii_hex_encode

    fn pdf_ascii_hex_encode(data : Bytes) -> Bytes

    pdf_ascii_hex_encode_view

    fn pdf_ascii_hex_encode_view(data : BytesView) -> Bytes

    pdf_authenticate_owner_password

    fn pdf_authenticate_owner_password(no_encrypt_metadata : Bool, owner_password : BytesView, revision : Int, user_entry : BytesView, owner_entry : BytesView, permissions : Int, file_id : BytesView, key_length_bits : Int) -> Bool raise PdfError

    pdf_authenticate_owner_password_aesv3

    fn pdf_authenticate_owner_password_aesv3(iso : Bool, password : BytesView, user_entry : BytesView, owner_entry : BytesView) -> Bool raise PdfError

    pdf_authenticate_user_password

    fn pdf_authenticate_user_password(no_encrypt_metadata : Bool, user_password : BytesView, revision : Int, user_entry : BytesView, owner_entry : BytesView, permissions : Int, file_id : BytesView, key_length_bits : Int) -> Bool raise PdfError

    pdf_authenticate_user_password_aesv3

    fn pdf_authenticate_user_password_aesv3(iso : Bool, password : BytesView, user_entry : BytesView) -> Bool raise PdfError

    pdf_banlist_of_p

    fn pdf_banlist_of_p(mask : Int) -> Array[PdfPermission]

    pdf_bookmark_black

    let pdf_bookmark_black : PdfBookmarkColour

    pdf_build_name_tree

    fn pdf_build_name_tree(is_number : Bool, document : PdfDocument, entries : ArrayView[(Bytes, PdfObject)]) -> PdfObject raise PdfError

    pdf_byte_of_int

    fn pdf_byte_of_int(value : Int) -> Byte raise PdfError

    pdf_bytes_concat_views

    fn pdf_bytes_concat_views(parts : ArrayView[BytesView]) -> Bytes

    pdf_bytes_copy

    fn pdf_bytes_copy(values : BytesView) -> Bytes

    pdf_bytes_get

    fn pdf_bytes_get(bytes : Bytes, index : Int) -> Byte?

    pdf_bytes_length

    fn pdf_bytes_length(bytes : Bytes) -> Int

    pdf_bytes_make

    fn pdf_bytes_make(length : Int, value? : Int) -> Bytes raise PdfError

    pdf_bytes_map_int

    fn pdf_bytes_map_int(bytes : BytesView, f : (Int) -> Int) -> Bytes raise PdfError

    pdf_bytes_of_array_view

    fn pdf_bytes_of_array_view(values : ArrayView[Byte]) -> Bytes

    pdf_bytes_of_date

    fn pdf_bytes_of_date(date : PdfDate) -> Bytes raise PdfError

    pdf_bytes_of_int_array

    fn pdf_bytes_of_int_array(values : ArrayView[Int]) -> Bytes raise PdfError

    pdf_bytes_of_int_arrays

    fn pdf_bytes_of_int_arrays(values : ArrayView[ArrayView[Int]]) -> Bytes raise PdfError

    pdf_bytes_of_view

    fn pdf_bytes_of_view(values : BytesView) -> Bytes

    pdf_bytes_to_array

    fn pdf_bytes_to_array(bytes : Bytes) -> Array[Byte]

    pdf_bytes_to_fixed_array

    fn pdf_bytes_to_fixed_array(bytes : Bytes) -> FixedArray[Byte]

    pdf_ccitt_encode

    fn pdf_ccitt_encode(columns : Int, rows : Int, data : Bytes) -> Bytes raise PdfError

    pdf_ccitt_encode_view

    fn pdf_ccitt_encode_view(columns : Int, rows : Int, data : BytesView) -> Bytes raise PdfError

    pdf_ccitt_g4_encode

    fn pdf_ccitt_g4_encode(columns : Int, rows : Int, data : Bytes) -> Bytes raise PdfError

    pdf_ccitt_g4_encode_view

    fn pdf_ccitt_g4_encode_view(columns : Int, rows : Int, data : BytesView) -> Bytes raise PdfError

    pdf_change_pages

    fn pdf_change_pages(change_references : Bool, document : PdfDocument, pages : ArrayView[PdfPage], matrices? : ArrayView[(Int, TransformMatrix)], changes? : ArrayView[(Int, Int)]) -> PdfDocument raise PdfError

    pdf_charcode_extractor_of_font

    fn pdf_charcode_extractor_of_font(document : PdfDocument, font : PdfObject, debug? : Bool) -> ((Int) -> Int?) raise PdfError

    pdf_charcode_extractor_of_font_real

    fn pdf_charcode_extractor_of_font_real(font : PdfFont, debug? : Bool) -> ((Int) -> Int?)

    pdf_codepoint_of_pdfdocencoding_byte

    fn pdf_codepoint_of_pdfdocencoding_byte(value : Int) -> Int raise PdfError

    pdf_codepoints_of_pdfdocencoding

    fn pdf_codepoints_of_pdfdocencoding(bytes : BytesView) -> Array[Int] raise PdfError

    pdf_codepoints_of_pdfdocstring

    fn pdf_codepoints_of_pdfdocstring(bytes : BytesView) -> Array[Int] raise PdfError

    pdf_codepoints_of_text

    fn pdf_codepoints_of_text(extractor : PdfTextExtractor, text : BytesView) -> Array[Int] raise PdfError

    pdf_codepoints_of_utf16be

    fn pdf_codepoints_of_utf16be(bytes : BytesView) -> Array[Int] raise PdfError

    pdf_codepoints_of_utf8

    fn pdf_codepoints_of_utf8(bytes : BytesView) -> Array[Int] raise PdfError

    pdf_colour_space_components

    fn pdf_colour_space_components(document : PdfDocument, resources : PdfObject, object : PdfObject) -> Int raise PdfError

    pdf_colour_space_of_device_name

    fn pdf_colour_space_of_device_name(name : PdfName) -> PdfColourSpace?

    pdf_colour_space_of_object

    fn pdf_colour_space_of_object(object : PdfObject) -> PdfColourSpace?

    pdf_content_begin_artifact

    fn pdf_content_begin_artifact() -> PdfContentOp

    pdf_content_bytes_of_op

    fn pdf_content_bytes_of_op(op : PdfContentOp) -> Bytes raise PdfError

    pdf_content_bytes_of_ops

    fn pdf_content_bytes_of_ops(ops : ArrayView[PdfContentOp]) -> Bytes raise PdfError

    pdf_content_concat_stream_views

    fn pdf_content_concat_stream_views(streams : ArrayView[BytesView]) -> Bytes

    pdf_content_concat_streams

    fn pdf_content_concat_streams(streams : ArrayView[Bytes]) -> Bytes

    pdf_content_end_artifact

    fn pdf_content_end_artifact() -> PdfContentOp

    pdf_content_stream_of_ops

    fn pdf_content_stream_of_ops(ops : ArrayView[PdfContentOp]) -> PdfObject raise PdfError

    pdf_cryptprimitives_aes_decrypt_data

    fn pdf_cryptprimitives_aes_decrypt_data(nk : Int, key : ArrayView[Int], data : BytesView, remove_padding? : Bool) -> Bytes raise PdfError

    pdf_cryptprimitives_aes_decrypt_data_ecb

    fn pdf_cryptprimitives_aes_decrypt_data_ecb(nk : Int, key : ArrayView[Int], data : BytesView, remove_padding? : Bool) -> Bytes raise PdfError

    pdf_cryptprimitives_aes_encrypt_data_ecb

    fn pdf_cryptprimitives_aes_encrypt_data_ecb(nk : Int, key : ArrayView[Int], data : BytesView) -> Bytes raise PdfError

    pdf_cryptprimitives_aes_encrypt_data_with_firstblock

    fn pdf_cryptprimitives_aes_encrypt_data_with_firstblock(nk : Int, key : ArrayView[Int], data : BytesView, firstblock : BytesView) -> Bytes raise PdfError

    pdf_cryptprimitives_crypt

    fn pdf_cryptprimitives_crypt(key : ArrayView[Int], data : BytesView) -> Bytes raise PdfError

    pdf_cryptprimitives_decrypt_stream_data

    fn pdf_cryptprimitives_decrypt_stream_data(crypt_type : PdfCryptType, encrypt : Bool, file_encryption_key : BytesView?, object_number : Int, generation : Int, key : ArrayView[Int], key_length_bits : Int, revision : Int, data : BytesView, firstblock? : BytesView?) -> Bytes raise PdfError

    pdf_cryptprimitives_find_hash

    fn pdf_cryptprimitives_find_hash(crypt_type : PdfCryptType, object_number : Int, generation : Int, key : ArrayView[Int], key_length_bits : Int) -> Array[Int] raise PdfError

    pdf_date_of_bytes

    fn pdf_date_of_bytes(bytes : Bytes) -> PdfDate raise PdfError

    pdf_date_of_object

    fn pdf_date_of_object(object : PdfObject) -> PdfDate raise PdfError

    pdf_date_of_string

    fn pdf_date_of_string(text : String) -> PdfDate raise PdfError

    pdf_date_of_view

    fn pdf_date_of_view(bytes : BytesView) -> PdfDate raise PdfError

    pdf_decode_filter_bytes

    fn pdf_decode_filter_bytes(filter : PdfName, data : Bytes) -> Bytes raise PdfError

    pdf_decode_filter_view

    fn pdf_decode_filter_view(filter : PdfName, data : BytesView) -> Bytes raise PdfError

    pdf_decode_predictor

    fn pdf_decode_predictor(predictor : Int, colors : Int, bits_per_component : Int, columns : Int, data : Bytes) -> Bytes raise PdfError

    pdf_decode_predictor_view

    fn pdf_decode_predictor_view(predictor : Int, colors : Int, bits_per_component : Int, columns : Int, data : BytesView) -> Bytes raise PdfError

    pdf_decode_stream

    fn pdf_decode_stream(object : PdfObject) -> PdfObject raise PdfError

    pdf_decode_stream_onestage

    fn pdf_decode_stream_onestage(object : PdfObject) -> PdfObject raise PdfError

    pdf_decrypt_pdf

    fn pdf_decrypt_pdf(document : PdfDocument, user_password : BytesView, owner_password? : BytesView?, no_encrypt_metadata? : Bool) -> (PdfDocument?, Array[PdfPermission]) raise PdfError

    pdf_decrypt_pdf_owner

    fn pdf_decrypt_pdf_owner(document : PdfDocument, owner_password : BytesView, no_encrypt_metadata? : Bool) -> PdfDocument? raise PdfError

    pdf_decrypt_single_stream

    fn pdf_decrypt_single_stream(document : PdfDocument, object_number : Int, generation : Int, stream : PdfObject, user_password? : BytesView?, owner_password? : BytesView?, no_encrypt_metadata? : Bool) -> PdfObject? raise PdfError

    pdf_default_version

    let pdf_default_version : PdfVersion

    pdf_deterministic_aes_iv_provider_from_seed

    fn pdf_deterministic_aes_iv_provider_from_seed(seed : BytesView) -> ((Int, Int, Int) -> Bytes raise PdfError)

    pdf_deterministic_aesv3_random_provider_from_seed

    fn pdf_deterministic_aesv3_random_provider_from_seed(seed : BytesView) -> ((PdfAesV3RandomField, Int) -> Bytes raise PdfError)

    pdf_dictionary

    fn pdf_dictionary(entries : ArrayView[(PdfName, PdfObject)]) -> PdfObject

    pdf_document_empty

    fn pdf_document_empty() -> PdfDocument

    pdf_document_of_parsed_indirect_objects

    fn pdf_document_of_parsed_indirect_objects(objects : ArrayView[PdfParsedIndirectObject], version? : PdfVersion) -> PdfDocument

    pdf_encode_filter_bytes

    fn pdf_encode_filter_bytes(filter : PdfName, data : Bytes) -> Bytes raise PdfError

    pdf_encode_filter_bytes_with_flate_level

    fn pdf_encode_filter_bytes_with_flate_level(filter : PdfName, data : Bytes, flate_level : Int) -> Bytes raise PdfError

    pdf_encode_filter_view

    fn pdf_encode_filter_view(filter : PdfName, data : BytesView) -> Bytes raise PdfError

    pdf_encode_filter_view_with_flate_level

    fn pdf_encode_filter_view_with_flate_level(filter : PdfName, data : BytesView, flate_level : Int) -> Bytes raise PdfError

    pdf_encode_predictor

    fn pdf_encode_predictor(predictor : Int, colors : Int, bits_per_component : Int, columns : Int, data : Bytes) -> Bytes raise PdfError

    pdf_encode_predictor_view

    fn pdf_encode_predictor_view(predictor : Int, colors : Int, bits_per_component : Int, columns : Int, data : BytesView) -> Bytes raise PdfError

    pdf_encode_stream_with_encoding

    fn pdf_encode_stream_with_encoding(encoding : PdfStreamEncoding, object : PdfObject, only_if_smaller? : Bool, predictor? : PdfStreamPredictor?, predictor_columns? : Int, flate_level? : Int?) -> PdfObject raise PdfError

    pdf_encode_stream_with_filter

    fn pdf_encode_stream_with_filter(filter : PdfName, object : PdfObject, only_if_smaller? : Bool, flate_level? : Int?) -> PdfObject raise PdfError

    pdf_encode_stream_with_filter_and_predictor

    fn pdf_encode_stream_with_filter_and_predictor(filter : PdfName, predictor : Int, colors : Int, bits_per_component : Int, columns : Int, object : PdfObject, only_if_smaller? : Bool, flate_level? : Int?) -> PdfObject raise PdfError

    pdf_encoding_of_name

    fn pdf_encoding_of_name(name : PdfName) -> PdfEncoding?

    pdf_encrypt_pdf_128bit

    fn pdf_encrypt_pdf_128bit(document : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], file_id? : BytesView) -> PdfDocument raise PdfError

    pdf_encrypt_pdf_40bit

    fn pdf_encrypt_pdf_40bit(document : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], file_id? : BytesView) -> PdfDocument raise PdfError

    pdf_encrypt_pdf_AES

    fn pdf_encrypt_pdf_AES(document : PdfDocument, encrypt_metadata : Bool, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], file_id? : BytesView) -> PdfDocument raise PdfError

    pdf_encrypt_pdf_AES256

    fn pdf_encrypt_pdf_AES256(document : PdfDocument, encrypt_metadata : Bool, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], file_id? : BytesView) -> PdfDocument raise PdfError

    pdf_encrypt_pdf_AES256ISO

    fn pdf_encrypt_pdf_AES256ISO(document : PdfDocument, encrypt_metadata : Bool, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], file_id? : BytesView) -> PdfDocument raise PdfError

    pdf_encrypt_pdf_AES256ISO_with_providers

    fn pdf_encrypt_pdf_AES256ISO_with_providers(document : PdfDocument, encrypt_metadata : Bool, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], random_provider : (PdfAesV3RandomField, Int) -> Bytes raise PdfError, iv_provider : (Int, Int, Int) -> Bytes raise PdfError, file_id? : BytesView) -> PdfDocument raise PdfError

    pdf_encrypt_pdf_AES256_with_providers

    fn pdf_encrypt_pdf_AES256_with_providers(document : PdfDocument, encrypt_metadata : Bool, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], random_provider : (PdfAesV3RandomField, Int) -> Bytes raise PdfError, iv_provider : (Int, Int, Int) -> Bytes raise PdfError, file_id? : BytesView) -> PdfDocument raise PdfError

    pdf_encrypt_pdf_AES_with_iv_provider

    fn pdf_encrypt_pdf_AES_with_iv_provider(document : PdfDocument, encrypt_metadata : Bool, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], iv_provider : (Int, Int, Int) -> Bytes raise PdfError, file_id? : BytesView) -> PdfDocument raise PdfError

    pdf_encryption_file_key

    fn pdf_encryption_file_key(no_encrypt_metadata : Bool, password : BytesView, revision : Int, owner_entry : BytesView, permissions : Int, file_id : BytesView, key_length_bits : Int) -> Bytes

    pdf_encryption_object_key

    fn pdf_encryption_object_key(crypt_type : PdfCryptType, object_number : Int, generation : Int, file_key : BytesView, key_length_bits : Int) -> Bytes

    pdf_endpage

    fn pdf_endpage(document : PdfDocument) -> Int raise PdfError

    pdf_endpage_fast

    fn pdf_endpage_fast(document : PdfDocument) -> Int raise PdfError

    pdf_eval_function

    fn pdf_eval_function(function : PdfFunction, inputs : ArrayView[Double]) -> Array[Double] raise PdfError

    pdf_flate_decode

    fn pdf_flate_decode(data : Bytes) -> Bytes raise PdfError

    pdf_flate_decode_view

    fn pdf_flate_decode_view(data : BytesView) -> Bytes raise PdfError

    pdf_flate_encode

    fn pdf_flate_encode(data : Bytes) -> Bytes

    pdf_flate_encode_view

    fn pdf_flate_encode_view(data : BytesView) -> Bytes

    pdf_flate_encode_view_with_level

    fn pdf_flate_encode_view_with_level(data : BytesView, level : Int) -> Bytes raise PdfError

    pdf_flate_encode_with_level

    fn pdf_flate_encode_with_level(data : Bytes, level : Int) -> Bytes raise PdfError

    pdf_format_real

    fn pdf_format_real(value : Double) -> Bytes raise PdfError

    pdf_generate_id

    fn pdf_generate_id(path : String, get_time : () -> Double) -> PdfObject

    pdf_get_encryption_values

    fn pdf_get_encryption_values(document : PdfDocument) -> PdfEncryptionValues raise PdfError

    pdf_get_image_24bpp

    fn pdf_get_image_24bpp(document : PdfDocument, resources : PdfObject, image : PdfObject) -> PdfImage raise PdfError

    pdf_get_jpeg_data

    fn pdf_get_jpeg_data(input : ByteCursor) -> Bytes raise PdfError

    pdf_glyphnames_of_text

    fn pdf_glyphnames_of_text(extractor : PdfTextExtractor, text : BytesView) -> Array[PdfName] raise PdfError

    pdf_image_bpc

    fn pdf_image_bpc(document : PdfDocument, image : PdfObject) -> PdfObject?

    pdf_image_colspace

    fn pdf_image_colspace(document : PdfDocument, image : PdfObject, resources : PdfObject) -> PdfColourSpace raise PdfError

    pdf_int_array_of_bytes

    fn pdf_int_array_of_bytes(bytes : BytesView) -> Array[Int]

    pdf_is_delimiter_byte

    fn pdf_is_delimiter_byte(value : Int) -> Bool

    pdf_is_encrypted

    fn pdf_is_encrypted(document : PdfDocument) -> Bool

    pdf_is_identity_h

    fn pdf_is_identity_h(font : PdfFont) -> Bool

    pdf_is_linearized

    fn pdf_is_linearized(data : BytesView) -> Bool

    pdf_is_newline_byte

    fn pdf_is_newline_byte(value : Int) -> Bool

    pdf_is_not_whitespace_byte

    fn pdf_is_not_whitespace_byte(value : Int) -> Bool

    pdf_is_unicode_string

    fn pdf_is_unicode_string(bytes : BytesView) -> Bool

    pdf_is_whitespace_byte

    fn pdf_is_whitespace_byte(value : Int) -> Bool

    pdf_is_whitespace_or_delimiter_byte

    fn pdf_is_whitespace_or_delimiter_byte(value : Int) -> Bool

    pdf_lex_bytes

    fn pdf_lex_bytes(data : Bytes) -> Array[PdfLexeme] raise PdfError

    pdf_lex_single_view

    fn pdf_lex_single_view(data : BytesView) -> PdfLexeme raise PdfError

    pdf_lex_view

    fn pdf_lex_view(data : BytesView) -> Array[PdfLexeme] raise PdfError

    pdf_lexeme_debug_name

    fn pdf_lexeme_debug_name(lexeme : PdfLexeme) -> String

    pdf_lzw_decode

    fn pdf_lzw_decode(data : Bytes, early_change? : Int) -> Bytes raise PdfError

    pdf_lzw_decode_view

    fn pdf_lzw_decode_view(data : BytesView, early_change? : Int) -> Bytes raise PdfError

    pdf_make_font

    fn pdf_make_font(fontname : PdfName, encoding : PdfEncoding) -> PdfObject raise PdfError

    pdf_make_hex_pdf_string

    fn pdf_make_hex_pdf_string(bytes : BytesView) -> Bytes

    pdf_make_owner_password_entry

    fn pdf_make_owner_password_entry(revision : Int, owner_password : BytesView, user_password : BytesView, key_length_bits : Int) -> Bytes raise PdfError

    pdf_make_pdf_string

    fn pdf_make_pdf_string(bytes : BytesView) -> Bytes

    pdf_make_user_password_entry

    fn pdf_make_user_password_entry(no_encrypt_metadata : Bool, user_password : BytesView, revision : Int, owner_entry : BytesView, permissions : Int, file_id : BytesView, key_length_bits : Int) -> Bytes raise PdfError

    pdf_md5_digest

    fn pdf_md5_digest(data : BytesView) -> Bytes

    pdf_merge_documents

    fn pdf_merge_documents(documents : ArrayView[PdfDocument], ranges : ArrayView[Array[Int]], retain_numbering? : Bool, retain_bookmarks? : Bool, retain_optional_content? : Bool, retain_acroforms? : Bool, retain_named_destinations? : Bool, retain_name_dictionary? : Bool, retain_structure_tree? : Bool, add_toplevel_document? : Bool, retain_info? : Bool, retain_catalog_entries? : Bool, remove_duplicate_fonts? : Bool) -> PdfDocument raise PdfError

    pdf_merge_name_trees_no_clash

    fn pdf_merge_name_trees_no_clash(document : PdfDocument, trees : ArrayView[PdfObject]) -> PdfObject

    pdf_merge_number_trees_no_clash

    fn pdf_merge_number_trees_no_clash(document : PdfDocument, trees : ArrayView[PdfObject]) -> PdfObject

    pdf_merge_pdfs

    fn pdf_merge_pdfs(retain_numbering : Bool, remove_duplicate_fonts : Bool, names : ArrayView[String], documents : ArrayView[PdfDocument], ranges : ArrayView[Array[Int]], process_struct_trees? : Bool, add_toplevel_document? : Bool) -> PdfDocument raise PdfError

    pdf_merge_structure_trees

    fn pdf_merge_structure_trees(document : PdfDocument, documents : ArrayView[PdfDocument], add_toplevel_document? : Bool) -> Int? raise PdfError

    pdf_minimum_valid_pdf

    fn pdf_minimum_valid_pdf() -> PdfDocument raise PdfError

    pdf_name_of_bytes

    fn pdf_name_of_bytes(bytes : Bytes) -> PdfName

    pdf_name_of_colour_space

    fn pdf_name_of_colour_space(space : PdfColourSpace) -> PdfName?

    pdf_name_of_view

    fn pdf_name_of_view(bytes : BytesView) -> PdfName

    pdf_no_more

    let pdf_no_more : Int

    pdf_object_entry

    fn pdf_object_entry(data : PdfObjectData, generation? : Int) -> PdfObjectEntry

    pdf_object_map_empty

    fn pdf_object_map_empty() -> PdfObjectMap

    pdf_object_of_colour_space

    fn pdf_object_of_colour_space(space : PdfColourSpace) -> PdfObject?

    pdf_object_of_date

    fn pdf_object_of_date(date : PdfDate) -> PdfObject raise PdfError

    pdf_object_of_destination

    fn pdf_object_of_destination(destination : PdfDestination) -> PdfObject

    pdf_object_of_function

    fn pdf_object_of_function(document : PdfDocument, function : PdfFunction) -> PdfObject

    pdf_object_of_matrix

    fn pdf_object_of_matrix(matrix : TransformMatrix) -> PdfObject

    pdf_objects_empty

    fn pdf_objects_empty() -> PdfObjects

    pdf_objects_of_entries

    fn pdf_objects_of_entries(entries : ArrayView[(Int, PdfObjectEntry)]) -> PdfObjects

    pdf_ocg_default_config

    fn pdf_ocg_default_config() -> PdfOcgConfig

    pdf_of_pages

    fn pdf_of_pages(document : PdfDocument, page_numbers : ArrayView[Int], retain_numbering? : Bool, process_struct_tree? : Bool) -> PdfDocument raise PdfError

    pdf_optional_content_merge

    fn pdf_optional_content_merge(documents : ArrayView[PdfDocument]) -> PdfOptionalContent? raise PdfError

    pdf_p_of_permissions

    fn pdf_p_of_permissions(permissions : ArrayView[PdfPermission]) -> Int

    pdf_pad_password

    fn pdf_pad_password(password : BytesView) -> Bytes

    pdf_page_blank

    fn pdf_page_blank(paper : PaperSize) -> PdfPage

    pdf_page_custom

    fn pdf_page_custom(rectangle : PdfObject) -> PdfPage

    pdf_page_int_of_rotation

    fn pdf_page_int_of_rotation(rotation : PdfPageRotation) -> Int

    pdf_page_label_add_label

    fn pdf_page_label_add_label(end_page : Int, labels : ArrayView[PdfPageLabel], label : PdfPageLabel, range_end_page : Int) -> Array[PdfPageLabel]

    pdf_page_label_basic

    let pdf_page_label_basic : PdfPageLabel

    pdf_page_label_coalesce

    fn pdf_page_label_coalesce(labels : ArrayView[PdfPageLabel]) -> Array[PdfPageLabel]

    pdf_page_label_complete

    fn pdf_page_label_complete(labels : ArrayView[PdfPageLabel]) -> Array[PdfPageLabel]

    pdf_page_label_merge

    fn pdf_page_label_merge(pdfs : ArrayView[PdfDocument], ranges : ArrayView[Array[Int]]) -> Array[PdfPageLabel] raise PdfError

    pdf_page_label_of_page_number

    fn pdf_page_label_of_page_number(page_number : Int, labels : ArrayView[PdfPageLabel]) -> PdfPageLabel?

    pdf_page_label_of_single

    fn pdf_page_label_of_single(page_number : Int, label : PdfPageLabel) -> PdfPageLabel

    pdf_page_label_style_of_string

    fn pdf_page_label_style_of_string(text : String) -> PdfPageLabelStyle raise PdfError

    pdf_page_label_text_of_page_number

    fn pdf_page_label_text_of_page_number(page_number : Int, labels : ArrayView[PdfPageLabel]) -> Bytes?

    pdf_page_label_text_of_single

    fn pdf_page_label_text_of_single(page_number : Int, label : PdfPageLabel) -> Bytes

    pdf_page_object_number

    fn pdf_page_object_number(document : PdfDocument, page_number : Int) -> Int? raise PdfError

    pdf_page_process_stub

    fn[A, B, C] pdf_page_process_stub(process : (A, B) -> C raise, number : A, page : B) -> (C, A, TransformMatrix) raise

    pdf_page_protect

    fn pdf_page_protect(ops : ArrayView[PdfContentOp]) -> Array[PdfContentOp]

    pdf_page_rectangle_of_paper

    fn pdf_page_rectangle_of_paper(paper : PaperSize) -> PdfObject

    pdf_page_reference_numbers

    fn pdf_page_reference_numbers(document : PdfDocument) -> Array[Int] raise PdfError

    pdf_page_rotation_of_int

    fn pdf_page_rotation_of_int(value : Int) -> PdfPageRotation raise PdfError

    pdf_pagenumber_of_target

    fn pdf_pagenumber_of_target(document : PdfDocument, destination : PdfDestination) -> Int raise PdfError

    pdf_pages_of_pagetree

    fn pdf_pages_of_pagetree(document : PdfDocument) -> Array[PdfPage] raise PdfError

    pdf_parse_cmap

    fn pdf_parse_cmap(document : PdfDocument, cmap : PdfObject) -> PdfParsedCMap raise PdfError

    pdf_parse_cmap_data

    fn pdf_parse_cmap_data(data : BytesView) -> PdfParsedCMap

    pdf_parse_content_ops_from_bytes

    fn pdf_parse_content_ops_from_bytes(data : Bytes) -> Array[PdfContentOp] raise PdfError

    pdf_parse_content_ops_from_view

    fn pdf_parse_content_ops_from_view(data : BytesView) -> Array[PdfContentOp] raise PdfError

    pdf_parse_function

    fn pdf_parse_function(document : PdfDocument, function_object : PdfObject) -> PdfFunction raise PdfError

    pdf_parse_indirect_object_from_bytes

    fn pdf_parse_indirect_object_from_bytes(data : Bytes) -> PdfParsedIndirectObject raise PdfError

    pdf_parse_indirect_object_from_view

    fn pdf_parse_indirect_object_from_view(data : BytesView) -> PdfParsedIndirectObject raise PdfError

    pdf_parse_indirect_object_lexemes

    fn pdf_parse_indirect_object_lexemes(lexemes : ArrayView[PdfLexeme]) -> PdfParsedIndirectObject raise PdfError

    pdf_parse_indirect_objects

    fn pdf_parse_indirect_objects(lexemes : ArrayView[PdfLexeme]) -> Array[PdfParsedIndirectObject] raise PdfError

    pdf_parse_lexemes

    fn pdf_parse_lexemes(lexemes : ArrayView[PdfLexeme]) -> Array[PdfObject] raise PdfError

    pdf_parse_object_from_bytes

    fn pdf_parse_object_from_bytes(data : Bytes) -> PdfObject raise PdfError

    pdf_parse_object_from_view

    fn pdf_parse_object_from_view(data : BytesView) -> PdfObject raise PdfError

    pdf_parse_single_lexeme_object

    fn pdf_parse_single_lexeme_object(lexemes : ArrayView[PdfLexeme]) -> PdfObject raise PdfError

    pdf_parse_stream_object_from_bytes

    fn pdf_parse_stream_object_from_bytes(data : Bytes) -> PdfParsedIndirectObject raise PdfError

    pdf_parse_stream_object_from_view

    fn pdf_parse_stream_object_from_view(data : BytesView) -> PdfParsedIndirectObject raise PdfError

    pdf_password_padding

    fn pdf_password_padding() -> Bytes

    pdf_pdfdocencoding_byte_of_codepoint

    fn pdf_pdfdocencoding_byte_of_codepoint(codepoint : Int) -> Byte?

    pdf_pdfdocencoding_of_codepoints

    fn pdf_pdfdocencoding_of_codepoints(codepoints : ArrayView[Int]) -> Bytes?

    pdf_pdfdocstring_of_codepoints

    fn pdf_pdfdocstring_of_codepoints(codepoints : ArrayView[Int]) -> Bytes raise PdfError

    pdf_pdfdocstring_of_utf8

    fn pdf_pdfdocstring_of_utf8(bytes : BytesView) -> Bytes raise PdfError

    pdf_permissions

    fn pdf_permissions(document : PdfDocument) -> Array[PdfPermission] raise PdfError

    pdf_permissions_of_p

    fn pdf_permissions_of_p(mask : Int) -> Array[PdfPermission]

    pdf_postpend_operators

    fn pdf_postpend_operators(document : PdfDocument, operators : ArrayView[PdfContentOp], page : PdfPage, fast? : Bool) -> PdfPage raise PdfError

    pdf_prepend_operators

    fn pdf_prepend_operators(document : PdfDocument, operators : ArrayView[PdfContentOp], page : PdfPage, fast? : Bool) -> PdfPage raise PdfError

    pdf_print_function

    fn pdf_print_function(function : PdfFunction) -> Unit

    pdf_read_afm

    fn pdf_read_afm(data : BytesView) -> PdfAfmData raise PdfError

    pdf_read_bookmarks

    fn pdf_read_bookmarks(document : PdfDocument, preserve_actions? : Bool) -> Array[PdfBookmark] raise PdfError

    pdf_read_classic_document_from_bytes

    fn pdf_read_classic_document_from_bytes(data : Bytes) -> PdfDocument raise PdfError

    pdf_read_classic_document_from_view

    fn pdf_read_classic_document_from_view(data : BytesView) -> PdfDocument raise PdfError

    pdf_read_classic_document_revision_from_bytes

    fn pdf_read_classic_document_revision_from_bytes(data : Bytes, revision : Int) -> PdfDocument raise PdfError

    pdf_read_classic_document_revision_from_view

    fn pdf_read_classic_document_revision_from_view(data : BytesView, revision : Int) -> PdfDocument raise PdfError

    pdf_read_colour_space

    fn pdf_read_colour_space(document : PdfDocument, resources : PdfObject, object : PdfObject) -> PdfColourSpace? raise PdfError

    pdf_read_destination

    fn pdf_read_destination(document : PdfDocument, object : PdfObject, shallow? : Bool) -> PdfDestination raise PdfError

    pdf_read_document_from_bytes

    fn pdf_read_document_from_bytes(data : Bytes) -> PdfDocument raise PdfError

    pdf_read_document_from_bytes_with_passwords

    fn pdf_read_document_from_bytes_with_passwords(data : Bytes, user_password? : BytesView?, owner_password? : BytesView?) -> PdfDecryptionResult? raise PdfError

    pdf_read_document_from_view

    fn pdf_read_document_from_view(data : BytesView) -> PdfDocument raise PdfError

    pdf_read_document_from_view_with_passwords

    fn pdf_read_document_from_view_with_passwords(data : BytesView, user_password? : BytesView?, owner_password? : BytesView?) -> PdfDecryptionResult? raise PdfError

    pdf_read_document_revision_from_bytes

    fn pdf_read_document_revision_from_bytes(data : Bytes, revision : Int) -> PdfDocument raise PdfError

    pdf_read_document_revision_from_bytes_with_passwords

    fn pdf_read_document_revision_from_bytes_with_passwords(data : Bytes, revision : Int, user_password? : BytesView?, owner_password? : BytesView?) -> PdfDecryptionResult? raise PdfError

    pdf_read_document_revision_from_view

    fn pdf_read_document_revision_from_view(data : BytesView, revision : Int) -> PdfDocument raise PdfError

    pdf_read_document_revision_from_view_with_passwords

    fn pdf_read_document_revision_from_view_with_passwords(data : BytesView, revision : Int, user_password? : BytesView?, owner_password? : BytesView?) -> PdfDecryptionResult? raise PdfError

    pdf_read_font

    fn pdf_read_font(document : PdfDocument, font : PdfObject) -> PdfFont raise PdfError

    pdf_read_header_from_bytes

    fn pdf_read_header_from_bytes(data : Bytes) -> PdfVersion raise PdfError

    pdf_read_header_from_view

    fn pdf_read_header_from_view(data : BytesView) -> PdfVersion raise PdfError

    pdf_read_name_tree

    fn pdf_read_name_tree(document : PdfDocument, tree : PdfObject) -> Array[(Bytes, PdfObject)]

    pdf_read_number_tree

    fn pdf_read_number_tree(document : PdfDocument, tree : PdfObject) -> Array[(Bytes, PdfObject)]

    pdf_read_ocg

    fn pdf_read_ocg(document : PdfDocument) -> PdfOptionalContent? raise PdfError

    pdf_read_page_labels

    fn pdf_read_page_labels(document : PdfDocument) -> Array[PdfPageLabel] raise PdfError

    pdf_read_primitive_document_from_bytes

    fn pdf_read_primitive_document_from_bytes(data : Bytes) -> PdfDocument raise PdfError

    pdf_read_primitive_document_from_view

    fn pdf_read_primitive_document_from_view(data : BytesView) -> PdfDocument raise PdfError

    pdf_recrypt_pdf

    fn pdf_recrypt_pdf(document : PdfDocument, password : BytesView, renumber? : Bool) -> PdfDocument raise PdfError

    pdf_recrypt_pdf_with_iv_provider

    fn pdf_recrypt_pdf_with_iv_provider(document : PdfDocument, password : BytesView, iv_provider : (Int, Int, Int) -> Bytes raise PdfError, renumber? : Bool) -> PdfDocument raise PdfError

    pdf_recurse_array

    fn pdf_recurse_array(transform : (PdfObject) -> PdfObject, values : ArrayView[PdfObject]) -> PdfObject

    pdf_recurse_dict

    fn pdf_recurse_dict(transform : (PdfObject) -> PdfObject, entries : ArrayView[(PdfName, PdfObject)], preserve_order? : Bool) -> PdfObject

    pdf_remove_bookmarks

    fn pdf_remove_bookmarks(document : PdfDocument) -> PdfDocument raise PdfError

    pdf_remove_duplicate_fonts

    fn pdf_remove_duplicate_fonts(document : PdfDocument) -> Unit

    pdf_remove_ocg

    fn pdf_remove_ocg(document : PdfDocument) -> PdfDocument raise PdfError

    pdf_remove_page_labels

    fn pdf_remove_page_labels(document : PdfDocument) -> PdfDocument raise PdfError

    pdf_renumber_documents

    fn pdf_renumber_documents(documents : ArrayView[PdfDocument]) -> Array[PdfDocument] raise PdfError

    pdf_renumber_pages

    fn pdf_renumber_pages(document : PdfDocument, pages : ArrayView[PdfPage]) -> Array[PdfPage] raise PdfError

    pdf_renumber_parent_trees

    fn pdf_renumber_parent_trees(documents : ArrayView[PdfDocument]) -> Unit raise PdfError

    pdf_reverse_table_of_encoding

    fn pdf_reverse_table_of_encoding(encoding : PdfEncoding) -> Array[(PdfName, Int)]

    pdf_revisions_from_bytes

    fn pdf_revisions_from_bytes(data : Bytes) -> Int raise PdfError

    pdf_revisions_from_view

    fn pdf_revisions_from_view(data : BytesView) -> Int raise PdfError

    pdf_run_length_decode

    fn pdf_run_length_decode(data : Bytes) -> Bytes

    pdf_run_length_decode_view

    fn pdf_run_length_decode_view(data : BytesView) -> Bytes

    pdf_run_length_encode

    fn pdf_run_length_encode(data : Bytes) -> Bytes

    pdf_run_length_encode_view

    fn pdf_run_length_encode_view(data : BytesView) -> Bytes

    pdf_secure_random_bytes

    fn pdf_secure_random_bytes(length : Int) -> Bytes raise PdfError

    pdf_sha256_digest

    fn pdf_sha256_digest(data : BytesView) -> Bytes

    pdf_sha384_digest

    fn pdf_sha384_digest(data : BytesView) -> Bytes

    pdf_sha512_digest

    fn pdf_sha512_digest(data : BytesView) -> Bytes

    pdf_shortest_unused_prefix

    fn pdf_shortest_unused_prefix(document : PdfDocument) -> String

    pdf_simplify_utf16be

    fn pdf_simplify_utf16be(bytes : BytesView) -> Bytes raise PdfError

    pdf_standard14_afm_data

    fn pdf_standard14_afm_data(font : PdfStandardFont) -> PdfAfmData

    pdf_standard14_baseline_adjustment

    fn pdf_standard14_baseline_adjustment(font : PdfStandardFont) -> Int

    pdf_standard14_flags_of_standard_font

    fn pdf_standard14_flags_of_standard_font(font : PdfStandardFont) -> Int

    pdf_standard14_stemv_of_standard_font

    fn pdf_standard14_stemv_of_standard_font(font : PdfStandardFont) -> Int

    pdf_standard14_text_width

    fn pdf_standard14_text_width(font : PdfStandardFont, encoding : PdfEncoding, text : BytesView, kern? : Bool) -> Int

    pdf_standard14_textwidth

    fn pdf_standard14_textwidth(kern : Bool, encoding : PdfEncoding, font : PdfStandardFont, text : BytesView) -> Int

    pdf_standard_font_of_name

    fn pdf_standard_font_of_name(name : String) -> PdfStandardFont?

    pdf_standard_font_of_pdf_name

    fn pdf_standard_font_of_pdf_name(name : PdfName) -> PdfStandardFont?

    pdf_stream

    fn pdf_stream(dictionary : PdfObject, data : PdfStreamData) -> PdfObject

    pdf_string_of_bookmark

    fn pdf_string_of_bookmark(bookmark : PdfBookmark) -> Bytes raise PdfError

    pdf_string_of_calculator

    fn pdf_string_of_calculator(ops : ArrayView[PdfCalculatorOp]) -> String

    pdf_string_of_colour_space

    fn pdf_string_of_colour_space(space : PdfColourSpace) -> String

    pdf_string_of_content_op

    fn pdf_string_of_content_op(op : PdfContentOp) -> Bytes raise PdfError

    pdf_string_of_content_ops

    fn pdf_string_of_content_ops(ops : ArrayView[PdfContentOp]) -> Bytes raise PdfError

    pdf_string_of_date

    fn pdf_string_of_date(date : PdfDate) -> String raise PdfError

    pdf_string_of_font

    fn pdf_string_of_font(font : PdfFont) -> String

    pdf_string_of_function

    fn pdf_string_of_function(function : PdfFunction) -> String

    pdf_string_of_int_array

    fn pdf_string_of_int_array(values : ArrayView[Int]) -> Bytes raise PdfError

    pdf_string_of_int_arrays

    fn pdf_string_of_int_arrays(values : ArrayView[ArrayView[Int]]) -> Bytes raise PdfError

    pdf_string_of_lexeme

    fn pdf_string_of_lexeme(lexeme : PdfLexeme) -> String

    pdf_string_of_lexemes

    fn pdf_string_of_lexemes(lexemes : ArrayView[PdfLexeme]) -> String

    pdf_string_of_page_label

    fn pdf_string_of_page_label(label : PdfPageLabel) -> Bytes

    pdf_string_of_pdf

    fn pdf_string_of_pdf(object : PdfObject) -> Bytes raise PdfError

    pdf_string_of_pdf_including_data

    fn pdf_string_of_pdf_including_data(object : PdfObject) -> Bytes raise PdfError

    pdf_string_of_standard_font

    fn pdf_string_of_standard_font(font : PdfStandardFont) -> String

    pdf_table_of_encoding

    fn pdf_table_of_encoding(encoding : PdfEncoding) -> Array[(Int, PdfName)]

    pdf_target_of_pagenumber

    fn pdf_target_of_pagenumber(document : PdfDocument, page_number : Int) -> PdfDestination raise PdfError

    pdf_text_extractor_of_font

    fn pdf_text_extractor_of_font(document : PdfDocument, font : PdfObject) -> PdfTextExtractor raise PdfError

    pdf_text_extractor_of_font_real

    fn pdf_text_extractor_of_font_real(font : PdfFont) -> PdfTextExtractor

    pdf_transform_annotations

    fn pdf_transform_annotations(document : PdfDocument, matrix : TransformMatrix, rest : PdfObject) -> Unit raise PdfError

    pdf_transform_bookmark

    fn pdf_transform_bookmark(document : PdfDocument, matrix : TransformMatrix, bookmark : PdfBookmark) -> PdfBookmark raise PdfError

    pdf_transform_destination

    fn pdf_transform_destination(document : PdfDocument, matrix : TransformMatrix, destination : PdfDestination) -> PdfDestination raise PdfError

    pdf_trim_structure_tree

    fn pdf_trim_structure_tree(document : PdfDocument, page_numbers : ArrayView[Int]) -> Unit raise PdfError

    pdf_user_password_from_owner_password

    fn pdf_user_password_from_owner_password(revision : Int, owner_password : BytesView, owner_entry : BytesView, key_length_bits : Int) -> Bytes raise PdfError

    pdf_utf16be_of_codepoints

    fn pdf_utf16be_of_codepoints(codepoints : ArrayView[Int]) -> Bytes raise PdfError

    pdf_utf8_of_codepoints

    fn pdf_utf8_of_codepoints(codepoints : ArrayView[Int]) -> Bytes raise PdfError

    pdf_utf8_of_pdfdocstring

    fn pdf_utf8_of_pdfdocstring(bytes : BytesView) -> Bytes raise PdfError

    pdf_what_encryption

    fn pdf_what_encryption(document : PdfDocument) -> PdfEncryptionMethod? raise PdfError

    pdf_write_colour_space

    fn pdf_write_colour_space(document : PdfDocument, space : PdfColourSpace) -> PdfObject

    pdf_write_document

    fn pdf_write_document(document : PdfDocument) -> Bytes raise PdfError

    pdf_write_document_incremental_update

    fn pdf_write_document_incremental_update(original : Bytes, document : PdfDocument) -> Bytes raise PdfError

    pdf_write_document_incremental_update_with_compressed_xref_stream

    fn pdf_write_document_incremental_update_with_compressed_xref_stream(original : Bytes, document : PdfDocument) -> Bytes raise PdfError

    pdf_write_document_incremental_update_with_generated_id

    fn pdf_write_document_incremental_update_with_generated_id(original : Bytes, document : PdfDocument, path : String, mode? : PdfWriteMode) -> Bytes raise PdfError

    pdf_write_document_incremental_update_with_mode

    fn pdf_write_document_incremental_update_with_mode(original : Bytes, document : PdfDocument, mode : PdfWriteMode) -> Bytes raise PdfError

    pdf_write_document_incremental_update_with_xref_stream

    fn pdf_write_document_incremental_update_with_xref_stream(original : Bytes, document : PdfDocument) -> Bytes raise PdfError

    pdf_write_document_options

    fn pdf_write_document_options(document : PdfDocument, encryption? : PdfWriteEncryption?, update_from? : Bytes?, make_id? : Bool, id_path? : String, mode? : PdfWriteMode, file_id? : BytesView, aes_iv_provider? : (Int, Int, Int) -> Bytes raise PdfError?, aesv3_random_provider? : (PdfAesV3RandomField, Int) -> Bytes raise PdfError?) -> Bytes raise PdfError

    pdf_write_document_with_compressed_xref_stream

    fn pdf_write_document_with_compressed_xref_stream(document : PdfDocument) -> Bytes raise PdfError

    pdf_write_document_with_generated_id

    fn pdf_write_document_with_generated_id(document : PdfDocument, path : String, mode? : PdfWriteMode) -> Bytes raise PdfError

    pdf_write_document_with_mode

    fn pdf_write_document_with_mode(document : PdfDocument, mode : PdfWriteMode) -> Bytes raise PdfError

    pdf_write_document_with_xref_stream

    fn pdf_write_document_with_xref_stream(document : PdfDocument) -> Bytes raise PdfError

    pdf_write_encrypted_128bit_document

    fn pdf_write_encrypted_128bit_document(document : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], mode? : PdfWriteMode, file_id? : BytesView) -> Bytes raise PdfError

    pdf_write_encrypted_128bit_r4_document

    fn pdf_write_encrypted_128bit_r4_document(document : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], encrypt_metadata? : Bool, mode? : PdfWriteMode, file_id? : BytesView) -> Bytes raise PdfError

    pdf_write_encrypted_40bit_document

    fn pdf_write_encrypted_40bit_document(document : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], mode? : PdfWriteMode, file_id? : BytesView) -> Bytes raise PdfError

    pdf_write_encrypted_aesv2_document

    fn pdf_write_encrypted_aesv2_document(document : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], encrypt_metadata? : Bool, mode? : PdfWriteMode, file_id? : BytesView) -> Bytes raise PdfError

    pdf_write_encrypted_aesv2_document_with_iv_provider

    fn pdf_write_encrypted_aesv2_document_with_iv_provider(document : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], iv_provider : (Int, Int, Int) -> Bytes raise PdfError, encrypt_metadata? : Bool, mode? : PdfWriteMode, file_id? : BytesView) -> Bytes raise PdfError

    pdf_write_encrypted_aesv3_document

    fn pdf_write_encrypted_aesv3_document(document : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], iso? : Bool, encrypt_metadata? : Bool, mode? : PdfWriteMode, file_id? : BytesView) -> Bytes raise PdfError

    pdf_write_encrypted_aesv3_document_with_providers

    fn pdf_write_encrypted_aesv3_document_with_providers(document : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], random_provider : (PdfAesV3RandomField, Int) -> Bytes raise PdfError, iv_provider : (Int, Int, Int) -> Bytes raise PdfError, iso? : Bool, encrypt_metadata? : Bool, mode? : PdfWriteMode, file_id? : BytesView) -> Bytes raise PdfError

    pdf_write_encrypted_aesv3_iso_document

    fn pdf_write_encrypted_aesv3_iso_document(document : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], encrypt_metadata? : Bool, mode? : PdfWriteMode, file_id? : BytesView) -> Bytes raise PdfError

    pdf_write_encrypted_aesv3_iso_document_with_providers

    fn pdf_write_encrypted_aesv3_iso_document_with_providers(document : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], random_provider : (PdfAesV3RandomField, Int) -> Bytes raise PdfError, iv_provider : (Int, Int, Int) -> Bytes raise PdfError, encrypt_metadata? : Bool, mode? : PdfWriteMode, file_id? : BytesView) -> Bytes raise PdfError

    pdf_write_encryption

    fn pdf_write_encryption(encryption_method : PdfEncryptionMethod, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission]) -> PdfWriteEncryption

    pdf_write_font

    fn pdf_write_font(document : PdfDocument, font : PdfFont, objnum? : Int?) -> Int raise PdfError

    pdf_write_hex_string

    fn pdf_write_hex_string(bytes : BytesView) -> Bytes

    pdf_write_indirect_object

    fn pdf_write_indirect_object(object : PdfParsedIndirectObject) -> Bytes raise PdfError

    pdf_write_literal_string

    fn pdf_write_literal_string(bytes : BytesView) -> Bytes

    pdf_write_name

    fn pdf_write_name(name : PdfName) -> Bytes

    pdf_write_object

    fn pdf_write_object(object : PdfObject) -> Bytes raise PdfError

    pdf_write_ocg

    fn pdf_write_ocg(document : PdfDocument, optional_content : PdfOptionalContent) -> PdfDocument raise PdfError

    pdf_write_page_labels

    fn pdf_write_page_labels(document : PdfDocument, labels : ArrayView[PdfPageLabel]) -> PdfDocument raise PdfError

    pdf_write_real

    fn pdf_write_real(value : Double) -> Bytes raise PdfError

    point2

    fn point2(x : Double, y : Double) -> Point2

    stream_to_get

    fn stream_to_get(input : ByteCursor, position : Int, length : Int) -> ToGet

    transform_append

    fn transform_append(after : ArrayView[TransformOp], before : ArrayView[TransformOp]) -> Array[TransformOp]

    transform_apply

    fn transform_apply(ops : ArrayView[TransformOp], point : Point2) -> Point2

    transform_apply_matrix

    fn transform_apply_matrix(matrix : TransformMatrix, point : Point2) -> Point2

    transform_apply_ops

    fn transform_apply_ops(ops : ArrayView[TransformOp], point : Point2) -> Point2

    transform_compose_op

    fn transform_compose_op(op : TransformOp, ops : ArrayView[TransformOp]) -> Array[TransformOp]

    transform_decompose

    fn transform_decompose(matrix : TransformMatrix) -> TransformDecomposition

    transform_identity

    fn transform_identity() -> Array[TransformOp]

    transform_identity_matrix

    let transform_identity_matrix : TransformMatrix

    transform_matrix_compose

    fn transform_matrix_compose(after : TransformMatrix, before : TransformMatrix) -> TransformMatrix

    transform_matrix_invert

    fn transform_matrix_invert(matrix : TransformMatrix) -> TransformMatrix raise PdfError

    transform_matrix_of_op

    fn transform_matrix_of_op(op : TransformOp) -> TransformMatrix

    transform_matrix_of_ops

    fn transform_matrix_of_ops(ops : ArrayView[TransformOp]) -> TransformMatrix

    transform_matrix_of_transform

    fn transform_matrix_of_transform(ops : ArrayView[TransformOp]) -> TransformMatrix

    transform_recompose

    fn transform_recompose(parts : TransformDecomposition) -> TransformMatrix

    transform_recompose_components

    fn transform_recompose_components(scale : Double, aspect : Double, rotation : Double, shear : Double, translate_x : Double, translate_y : Double) -> TransformMatrix

    transform_rotate

    fn transform_rotate(origin : Point2, angle : Double) -> TransformMatrix

    transform_scale

    fn transform_scale(origin : Point2, sx : Double, sy : Double) -> TransformMatrix

    transform_shear_x

    fn transform_shear_x(origin : Point2, factor : Double) -> TransformMatrix

    transform_shear_y

    fn transform_shear_y(origin : Point2, factor : Double) -> TransformMatrix

    transform_string_of_matrix

    fn transform_string_of_matrix(matrix : TransformMatrix) -> String

    transform_string_of_op

    fn transform_string_of_op(op : TransformOp) -> String

    transform_string_of_ops

    fn transform_string_of_ops(ops : ArrayView[TransformOp]) -> String

    transform_string_of_transform

    fn transform_string_of_transform(ops : ArrayView[TransformOp]) -> String

    transform_translate

    fn transform_translate(tx : Double, ty : Double) -> TransformMatrix

    unit_centimetres

    fn unit_centimetres(value : Double, unit : PdfUnit) -> Double

    unit_inches

    fn unit_inches(value : Double, unit : PdfUnit) -> Double

    unit_millimetres

    fn unit_millimetres(value : Double, unit : PdfUnit) -> Double

    unit_points

    fn unit_points(value : Double, unit : PdfUnit) -> Double