Byte-oriented PDF reading, writing, and manipulation toolkit for MoonBit.
Dependencies
flowchart LR
Bytes[PDF bytes] --> Reader[pdf_read_document_from_bytes]
Reader --> Document[PdfDocument]
Document --> Pages[page tree and resources]
Document --> Objects[object table]
Pages --> Content[content operators]
Objects --> Writer[pdf_write_document]
Content --> Writer
Writer --> BytesOut[PDF bytes]moon run --target native cmd/pdflite -- info fixtures/camlpdf/logo.pdf
moon run --target native cmd/pdflite -- info --json fixtures/camlpdf/logo.pdf
moon run --target native cmd/pdflite -- validate fixtures/camlpdf/logo.pdf
moon run --target native cmd/pdflite -- rewrite fixtures/camlpdf/logo.pdf _build/logo-roundtrip.pdf
moon run --target native cmd/pdflite -- merge _build/combined.pdf cover.pdf chapter-1.pdf appendix.pdfmoon run --target native --release --build-only cmd/pdflite
PDFLITE_CLI="$PWD/_build/native/release/build/moonbitlang/pdflite/cmd/pdflite/pdflite.exe" \
PDFLITE_LOGO_PDF="$PWD/fixtures/camlpdf/logo.pdf" \
moon cram test --shell /bin/bash --timeout-seconds 120 tests/crammoon check pdflite
moon test --target native pdflite
moon test --target wasm pdflite///|
test "minimum document round trip" {
let document = try! @pdflite.pdf_minimum_valid_pdf()
let bytes = try! @pdflite.pdf_write_document(document)
let version = try! @reader.pdf_read_header_from_bytes(bytes)
if version.major != 1 || version.minor != 0 {
fail("expected a PDF 1.0 header")
}
let parsed = try! @pdflite.pdf_read_document_from_bytes(bytes)
inspect(try! parsed.endpage(), content="1")
}///|
test "name writer escapes delimiter bytes" {
let name = @core.pdf_name_of_bytes(
try! @core.pdf_bytes_of_int_array([47, 65, 32, 66]),
)
@test.assert_eq(@core.pdf_int_array_of_bytes(@pdflite.pdf_write_name(name)), [
47, 65, 35, 50, 48, 66,
])
}pub(all) enum PdfAddTextFontSource {
PdfAddTextPreMadeFontPack(PdfFontPack)
PdfAddTextExistingNamedFont
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfAddTextFontSource::equal(PdfAddTextFontSource, PdfAddTextFontSource) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfAddTextFontSource::not_equal(x : PdfAddTextFontSource, y : PdfAddTextFontSource) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfAddTextFontSource::to_json(PdfAddTextFontSource) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfAddTextFontSource::to_repr(PdfAddTextFontSource) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfBookmarkNode::equal(PdfBookmarkNode, PdfBookmarkNode) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfBookmarkNode::not_equal(x : PdfBookmarkNode, y : PdfBookmarkNode) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfBookmarkNode::to_json(PdfBookmarkNode) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfBookmarkNode::to_repr(PdfBookmarkNode) -> Reprpub(all) struct PdfCIDKeyedFont {
basefont : PdfName
composite : PdfCompositeCIDFont
encoding : PdfCMapEncoding
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCIDKeyedFont::equal(PdfCIDKeyedFont, PdfCIDKeyedFont) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCIDKeyedFont::not_equal(x : PdfCIDKeyedFont, y : PdfCIDKeyedFont) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCIDKeyedFont::to_json(PdfCIDKeyedFont) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCIDKeyedFont::to_repr(PdfCIDKeyedFont) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCIDSystemInfo::equal(PdfCIDSystemInfo, PdfCIDSystemInfo) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCIDSystemInfo::not_equal(x : PdfCIDSystemInfo, y : PdfCIDSystemInfo) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCIDSystemInfo::to_json(PdfCIDSystemInfo) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCIDSystemInfo::to_repr(PdfCIDSystemInfo) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCIDVerticalWidth::equal(PdfCIDVerticalWidth, PdfCIDVerticalWidth) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCIDVerticalWidth::not_equal(x : PdfCIDVerticalWidth, y : PdfCIDVerticalWidth) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCIDVerticalWidth::to_json(PdfCIDVerticalWidth) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCIDVerticalWidth::to_repr(PdfCIDVerticalWidth) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCMapCodeSpace::equal(PdfCMapCodeSpace, PdfCMapCodeSpace) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCMapCodeSpace::not_equal(x : PdfCMapCodeSpace, y : PdfCMapCodeSpace) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCMapCodeSpace::to_json(PdfCMapCodeSpace) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCMapCodeSpace::to_repr(PdfCMapCodeSpace) -> Reprpub(all) enum PdfCMapEncoding {
PdfPredefinedCMap(PdfName)
PdfCMap(Int)
PdfExternalCMap(Int, PdfParsedCMap)
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCMapEncoding::equal(PdfCMapEncoding, PdfCMapEncoding) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCMapEncoding::not_equal(x : PdfCMapEncoding, y : PdfCMapEncoding) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCMapEncoding::to_json(PdfCMapEncoding) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCMapEncoding::to_repr(PdfCMapEncoding) -> Reprpub(all) struct PdfCalculatorFunction {
operations : Array[PdfCalculatorOp]
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCalculatorFunction::equal(PdfCalculatorFunction, PdfCalculatorFunction) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCalculatorFunction::not_equal(x : PdfCalculatorFunction, y : PdfCalculatorFunction) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCalculatorFunction::to_json(PdfCalculatorFunction) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCalculatorFunction::to_repr(PdfCalculatorFunction) -> Reprpub(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)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCalculatorOp::equal(PdfCalculatorOp, PdfCalculatorOp) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCalculatorOp::not_equal(x : PdfCalculatorOp, y : PdfCalculatorOp) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCalculatorOp::to_json(PdfCalculatorOp) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCalculatorOp::to_repr(PdfCalculatorOp) -> Reprpub(all) struct PdfClipContour {
hole : Bool
vertices : Array[PdfClipVertex]
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipContour::equal(PdfClipContour, PdfClipContour) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipContour::not_equal(x : PdfClipContour, y : PdfClipContour) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipContour::to_json(PdfClipContour) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipContour::to_repr(PdfClipContour) -> Reprfn PdfClipOperation::clip_polygons(self : PdfClipOperation, subject : PdfClipPolygon, clip : PdfClipPolygon) -> PdfClipPolygon raise PdfError#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipOperation::equal(PdfClipOperation, PdfClipOperation) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipOperation::not_equal(x : PdfClipOperation, y : PdfClipOperation) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipOperation::to_json(PdfClipOperation) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipOperation::to_repr(PdfClipOperation) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipPolygon::equal(PdfClipPolygon, PdfClipPolygon) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipPolygon::not_equal(x : PdfClipPolygon, y : PdfClipPolygon) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipPolygon::to_json(PdfClipPolygon) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipPolygon::to_repr(PdfClipPolygon) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipVertex::equal(PdfClipVertex, PdfClipVertex) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipVertex::not_equal(x : PdfClipVertex, y : PdfClipVertex) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipVertex::to_json(PdfClipVertex) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfClipVertex::to_repr(PdfClipVertex) -> Reprpub(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)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfColourSpace::equal(PdfColourSpace, PdfColourSpace) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfColourSpace::not_equal(x : PdfColourSpace, y : PdfColourSpace) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfColourSpace::to_json(PdfColourSpace) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfColourSpace::to_repr(PdfColourSpace) -> Reprpub(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)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCompositeCIDFont::equal(PdfCompositeCIDFont, PdfCompositeCIDFont) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCompositeCIDFont::not_equal(x : PdfCompositeCIDFont, y : PdfCompositeCIDFont) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCompositeCIDFont::to_json(PdfCompositeCIDFont) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfCompositeCIDFont::to_repr(PdfCompositeCIDFont) -> Reprpub(all) struct PdfContentAxialShading {
axialshading_coords : (Double, Double, Double, Double)
axialshading_domain : (Double, Double)
axialshading_function : Array[PdfFunction]
axialshading_extend : (Bool, Bool)
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentAxialShading::equal(PdfContentAxialShading, PdfContentAxialShading) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentAxialShading::not_equal(x : PdfContentAxialShading, y : PdfContentAxialShading) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentAxialShading::to_json(PdfContentAxialShading) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentAxialShading::to_repr(PdfContentAxialShading) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentBoundingBox::equal(PdfContentBoundingBox, PdfContentBoundingBox) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentBoundingBox::not_equal(x : PdfContentBoundingBox, y : PdfContentBoundingBox) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentBoundingBox::to_json(PdfContentBoundingBox) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentBoundingBox::to_repr(PdfContentBoundingBox) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentClippingState::equal(PdfContentClippingState, PdfContentClippingState) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentClippingState::not_equal(x : PdfContentClippingState, y : PdfContentClippingState) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentClippingState::to_json(PdfContentClippingState) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentClippingState::to_repr(PdfContentClippingState) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentColourValues::equal(PdfContentColourValues, PdfContentColourValues) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentColourValues::not_equal(x : PdfContentColourValues, y : PdfContentColourValues) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentColourValues::to_json(PdfContentColourValues) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentColourValues::to_repr(PdfContentColourValues) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentDashPattern::equal(PdfContentDashPattern, PdfContentDashPattern) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentDashPattern::not_equal(x : PdfContentDashPattern, y : PdfContentDashPattern) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentDashPattern::to_json(PdfContentDashPattern) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentDashPattern::to_repr(PdfContentDashPattern) -> Reprpub(all) struct PdfContentFunctionShading {
funshading_domain : (Double, Double, Double, Double)
funshading_matrix : TransformMatrix
funshading_function : PdfFunction
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentFunctionShading::equal(PdfContentFunctionShading, PdfContentFunctionShading) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentFunctionShading::not_equal(x : PdfContentFunctionShading, y : PdfContentFunctionShading) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentFunctionShading::to_json(PdfContentFunctionShading) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentFunctionShading::to_repr(PdfContentFunctionShading) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentGlyphState::equal(PdfContentGlyphState, PdfContentGlyphState) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentGlyphState::not_equal(x : PdfContentGlyphState, y : PdfContentGlyphState) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentGlyphState::to_json(PdfContentGlyphState) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentGlyphState::to_repr(PdfContentGlyphState) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentInlineTextFilter::equal(PdfContentInlineTextFilter, PdfContentInlineTextFilter) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentInlineTextFilter::not_equal(x : PdfContentInlineTextFilter, y : PdfContentInlineTextFilter) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentInlineTextFilter::to_repr(PdfContentInlineTextFilter) -> Reprpub(all) struct PdfContentJsonEntry {
object : PdfContentObject
state : PdfContentState
bounding_box : PdfContentBoundingBox
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentJsonEntry::equal(PdfContentJsonEntry, PdfContentJsonEntry) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentJsonEntry::not_equal(x : PdfContentJsonEntry, y : PdfContentJsonEntry) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentJsonEntry::to_json(PdfContentJsonEntry) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentJsonEntry::to_repr(PdfContentJsonEntry) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentLexeme::equal(PdfContentLexeme, PdfContentLexeme) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentLexeme::not_equal(x : PdfContentLexeme, y : PdfContentLexeme) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentLexeme::to_json(PdfContentLexeme) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentLexeme::to_repr(PdfContentLexeme) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentMarkedContent::equal(PdfContentMarkedContent, PdfContentMarkedContent) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentMarkedContent::not_equal(x : PdfContentMarkedContent, y : PdfContentMarkedContent) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentMarkedContent::to_json(PdfContentMarkedContent) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentMarkedContent::to_repr(PdfContentMarkedContent) -> Reprpub(all) enum PdfContentObject {
PdfContentGlyphObject(Int, String, String)
PdfContentInlineImageObject
PdfContentImageObject(String)
PdfContentPathObject(PdfDrawnPath)
PdfContentShadingObject(String)
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentObject::equal(PdfContentObject, PdfContentObject) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentObject::not_equal(x : PdfContentObject, y : PdfContentObject) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentObject::to_json(PdfContentObject) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentObject::to_repr(PdfContentObject) -> Reprpub(all) struct PdfContentOperatorFrame {
ctm : TransformMatrix
partial_path : PdfContentPartialPath
clipping_path : Array[PdfPath]
path : PdfDrawnPath
path_state : PdfContentPathState
text_state : PdfContentTextState
miter_limit : Double
flatness : Double
alpha_constant_stroke : Double
alpha_constant_non_stroke : Double
alpha_source : Bool
smoothness : Double
stroke_adjustment : Bool
overprint_stroke : Bool
overprint_non_stroke : Bool
overprint_mode : Int
black_generation : PdfObject
undercolour_removal : PdfObject
transfer : PdfObject
halftone : PdfObject
blend_mode : PdfObject
soft_mask : PdfObject
black_point_compensation : String
marked_content_point : PdfContentMarkedContent?
marked_content : Array[PdfContentMarkedContent]
type3_d0 : PdfContentType3D0?
type3_d1 : PdfContentType3D1?
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorFrame::equal(PdfContentOperatorFrame, PdfContentOperatorFrame) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorFrame::not_equal(x : PdfContentOperatorFrame, y : PdfContentOperatorFrame) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorFrame::to_json(PdfContentOperatorFrame) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorFrame::to_repr(PdfContentOperatorFrame) -> Reprpub(all) struct PdfContentOperatorResourceResult {
state : PdfContentOperatorState
entries : Array[PdfContentJsonEntry]
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorResourceResult::equal(PdfContentOperatorResourceResult, PdfContentOperatorResourceResult) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorResourceResult::not_equal(x : PdfContentOperatorResourceResult, y : PdfContentOperatorResourceResult) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorResourceResult::to_json(PdfContentOperatorResourceResult) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorResourceResult::to_repr(PdfContentOperatorResourceResult) -> Reprpub(all) struct PdfContentOperatorState {
ctm : TransformMatrix
partial_path : PdfContentPartialPath
clipping_path : Array[PdfPath]
path : PdfDrawnPath
path_state : PdfContentPathState
text_state : PdfContentTextState
miter_limit : Double
flatness : Double
alpha_constant_stroke : Double
alpha_constant_non_stroke : Double
alpha_source : Bool
smoothness : Double
stroke_adjustment : Bool
overprint_stroke : Bool
overprint_non_stroke : Bool
overprint_mode : Int
black_generation : PdfObject
undercolour_removal : PdfObject
transfer : PdfObject
halftone : PdfObject
blend_mode : PdfObject
soft_mask : PdfObject
black_point_compensation : String
marked_content_point : PdfContentMarkedContent?
marked_content : Array[PdfContentMarkedContent]
type3_d0 : PdfContentType3D0?
type3_d1 : PdfContentType3D1?
state_stack : Array[PdfContentOperatorFrame]
} derive(Eq, ToJson, Debug)fn PdfContentOperatorState::content_apply_core_op(self : PdfContentOperatorState, op : PdfContentOp) -> PdfContentOperatorStatefn PdfContentOperatorState::content_apply_graphics_parameter_op(self : PdfContentOperatorState, op : PdfContentOp) -> PdfContentOperatorStatefn PdfContentOperatorState::content_apply_graphics_state_op(self : PdfContentOperatorState, op : PdfContentOp) -> PdfContentOperatorStatefn PdfContentOperatorState::content_apply_marked_content_op(self : PdfContentOperatorState, op : PdfContentOp) -> PdfContentOperatorStatefn PdfContentOperatorState::content_apply_text_show_op(self : PdfContentOperatorState, font : PdfFont, op : PdfContentOp) -> PdfContentOperatorTextResult raise PdfErrorfn PdfContentOperatorState::content_apply_type3_metrics_op(self : PdfContentOperatorState, op : PdfContentOp) -> PdfContentOperatorStatefn PdfContentOperatorState::content_image_entry(self : PdfContentOperatorState, name : PdfName) -> PdfContentJsonEntryfn PdfContentOperatorState::content_inline_image_entry(self : PdfContentOperatorState) -> PdfContentJsonEntryfn PdfContentOperatorState::content_path_entry(self : PdfContentOperatorState, stroking : Bool) -> PdfContentJsonEntry?fn PdfContentOperatorState::content_shading_entry(self : PdfContentOperatorState, name : PdfName, shading_bbox : PdfRectangle?) -> PdfContentJsonEntry?fn PdfContentOperatorState::content_text_glyph_entry(self : PdfContentOperatorState, font : PdfFont, glyph : PdfContentTextGlyphPlacement) -> PdfContentJsonEntry raise PdfErrorfn PdfContentOperatorState::content_unit_square_bounding_box(self : PdfContentOperatorState) -> PdfContentBoundingBox#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorState::equal(PdfContentOperatorState, PdfContentOperatorState) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorState::not_equal(x : PdfContentOperatorState, y : PdfContentOperatorState) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorState::to_json(PdfContentOperatorState) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorState::to_repr(PdfContentOperatorState) -> Reprpub(all) struct PdfContentOperatorTextResult {
state : PdfContentOperatorState
entries : Array[PdfContentJsonEntry]
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorTextResult::equal(PdfContentOperatorTextResult, PdfContentOperatorTextResult) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorTextResult::not_equal(x : PdfContentOperatorTextResult, y : PdfContentOperatorTextResult) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorTextResult::to_json(PdfContentOperatorTextResult) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentOperatorTextResult::to_repr(PdfContentOperatorTextResult) -> Reprpub(all) struct PdfContentPathState {
clipping_path : Array[PdfPath]
colourspace_stroke : PdfColourSpace
colourspace_non_stroke : PdfColourSpace
colour_stroke : PdfContentColourValues
colour_non_stroke : PdfContentColourValues
line_width : Double
line_cap : Int
line_join : Int
dash_pattern : PdfContentDashPattern
rendering_intent : String
} derive(Eq, ToJson, Debug)fn PdfContentPathState::content_apply_path_state_op(self : PdfContentPathState, op : PdfContentOp) -> PdfContentPathStatefn PdfContentPathState::content_with_clipping_path(self : PdfContentPathState, clipping_path : ArrayView[PdfPath]) -> PdfContentPathState#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentPathState::equal(PdfContentPathState, PdfContentPathState) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentPathState::not_equal(x : PdfContentPathState, y : PdfContentPathState) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentPathState::to_json(PdfContentPathState) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentPathState::to_repr(PdfContentPathState) -> Reprpub(all) enum PdfContentPattern {
PdfContentColouredTilingPattern(PdfContentTiling)
PdfContentUncolouredTilingPattern(PdfContentTiling)
PdfContentShadingPattern(PdfContentShading)
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentPattern::equal(PdfContentPattern, PdfContentPattern) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentPattern::not_equal(x : PdfContentPattern, y : PdfContentPattern) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentPattern::to_json(PdfContentPattern) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentPattern::to_repr(PdfContentPattern) -> Reprpub(all) struct PdfContentRadialShading {
radialshading_coords : (Double, Double, Double, Double, Double, Double)
radialshading_domain : (Double, Double)
radialshading_function : Array[PdfFunction]
radialshading_extend : (Bool, Bool)
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentRadialShading::equal(PdfContentRadialShading, PdfContentRadialShading) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentRadialShading::not_equal(x : PdfContentRadialShading, y : PdfContentRadialShading) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentRadialShading::to_json(PdfContentRadialShading) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentRadialShading::to_repr(PdfContentRadialShading) -> Reprpub(all) struct PdfContentShading {
shading_colourspace : PdfObject
shading_background : PdfObject?
shading_bbox : PdfObject?
shading_antialias : Bool
shading_matrix : TransformMatrix
shading_extgstate : PdfObject
shading : PdfContentShadingKind
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentShading::equal(PdfContentShading, PdfContentShading) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentShading::not_equal(x : PdfContentShading, y : PdfContentShading) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentShading::to_json(PdfContentShading) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentShading::to_repr(PdfContentShading) -> Reprpub(all) enum PdfContentShadingKind {
PdfContentFunctionShading(PdfContentFunctionShading)
PdfContentAxialShading(PdfContentAxialShading)
PdfContentRadialShading(PdfContentRadialShading)
PdfContentFreeFormGouraudShading
PdfContentLatticeFormGouraudShading
PdfContentCoonsPatchMesh
PdfContentTensorProductPatchMesh
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentShadingKind::equal(PdfContentShadingKind, PdfContentShadingKind) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentShadingKind::not_equal(x : PdfContentShadingKind, y : PdfContentShadingKind) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentShadingKind::to_json(PdfContentShadingKind) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentShadingKind::to_repr(PdfContentShadingKind) -> Reprpub(all) enum PdfContentState {
PdfContentStateGlyph(PdfContentGlyphState)
PdfContentStatePath(PdfContentPathState)
PdfContentStateClipping(PdfContentClippingState)
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentState::equal(PdfContentState, PdfContentState) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentState::not_equal(x : PdfContentState, y : PdfContentState) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentState::to_json(PdfContentState) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentState::to_repr(PdfContentState) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextFontCacheEntry::equal(PdfContentTextFontCacheEntry, PdfContentTextFontCacheEntry) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextFontCacheEntry::not_equal(x : PdfContentTextFontCacheEntry, y : PdfContentTextFontCacheEntry) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextFontCacheEntry::to_json(PdfContentTextFontCacheEntry) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextFontCacheEntry::to_repr(PdfContentTextFontCacheEntry) -> Reprpub(all) struct PdfContentTextGlyphPlacement {
charcode : Int
text_matrix : TransformMatrix
width : Double
pvx : Double
pvy : Double
advance_x : Double
advance_y : Double
bounding_box : PdfContentBoundingBox
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextGlyphPlacement::equal(PdfContentTextGlyphPlacement, PdfContentTextGlyphPlacement) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextGlyphPlacement::not_equal(x : PdfContentTextGlyphPlacement, y : PdfContentTextGlyphPlacement) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextGlyphPlacement::to_json(PdfContentTextGlyphPlacement) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextGlyphPlacement::to_repr(PdfContentTextGlyphPlacement) -> Reprpub(all) struct PdfContentTextLayout {
font_size : Double
horizontal_scaling : Double
character_spacing : Double
word_spacing : Double
rise : Double
ctm : TransformMatrix
text_matrix : TransformMatrix
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextLayout::equal(PdfContentTextLayout, PdfContentTextLayout) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextLayout::not_equal(x : PdfContentTextLayout, y : PdfContentTextLayout) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextLayout::to_json(PdfContentTextLayout) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextLayout::to_repr(PdfContentTextLayout) -> Reprpub(all) struct PdfContentTextLayoutResult {
glyphs : Array[PdfContentTextGlyphPlacement]
text_matrix : TransformMatrix
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextLayoutResult::equal(PdfContentTextLayoutResult, PdfContentTextLayoutResult) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextLayoutResult::not_equal(x : PdfContentTextLayoutResult, y : PdfContentTextLayoutResult) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextLayoutResult::to_json(PdfContentTextLayoutResult) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextLayoutResult::to_repr(PdfContentTextLayoutResult) -> Reprpub(all) struct PdfContentTextOpResult {
text_state : PdfContentTextState
glyphs : Array[PdfContentTextGlyphPlacement]
} derive(Eq, ToJson, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextOpResult::equal(PdfContentTextOpResult, PdfContentTextOpResult) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextOpResult::not_equal(x : PdfContentTextOpResult, y : PdfContentTextOpResult) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextOpResult::to_json(PdfContentTextOpResult) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextOpResult::to_repr(PdfContentTextOpResult) -> Reprpub(all) struct PdfContentTextState {
character_spacing : Double
word_spacing : Double
horizontal_scaling : Double
leading : Double
font : String
current_font : PdfFont
font_cache : Array[PdfContentTextFontCacheEntry]
font_size : Double
rendering_mode : Int
rise : Double
knockout : Bool
text_matrix : TransformMatrix
line_matrix : TransformMatrix
} derive(Eq, ToJson, Debug)fn PdfContentTextState::content_apply_text_op(self : PdfContentTextState, font : PdfFont, ctm : TransformMatrix, op : PdfContentOp) -> PdfContentTextOpResultfn PdfContentTextState::content_apply_text_state_op(self : PdfContentTextState, op : PdfContentOp) -> PdfContentTextStatefn PdfContentTextState::content_cache_font(self : PdfContentTextState, name : String, font : PdfFont) -> PdfContentTextStatefn PdfContentTextState::content_glyph_state(self : PdfContentTextState, clipping_path : ArrayView[PdfPath]) -> PdfContentGlyphStatefn PdfContentTextState::content_text_layout(self : PdfContentTextState, ctm : TransformMatrix) -> PdfContentTextLayout#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextState::equal(PdfContentTextState, PdfContentTextState) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextState::not_equal(x : PdfContentTextState, y : PdfContentTextState) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextState::to_json(PdfContentTextState) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTextState::to_repr(PdfContentTextState) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTiling::equal(PdfContentTiling, PdfContentTiling) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTiling::not_equal(x : PdfContentTiling, y : PdfContentTiling) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTiling::to_json(PdfContentTiling) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentTiling::to_repr(PdfContentTiling) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentType3D0::equal(PdfContentType3D0, PdfContentType3D0) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentType3D0::not_equal(x : PdfContentType3D0, y : PdfContentType3D0) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentType3D0::to_json(PdfContentType3D0) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentType3D0::to_repr(PdfContentType3D0) -> Repr#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentType3D1::equal(PdfContentType3D1, PdfContentType3D1) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentType3D1::not_equal(x : PdfContentType3D1, y : PdfContentType3D1) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentType3D1::to_json(PdfContentType3D1) -> Json#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfContentType3D1::to_repr(PdfContentType3D1) -> Reprpub(all) struct PdfDecryptionResult {
document : PdfDocument
denied_permissions : Array[PdfPermission]
} derive(Eq, Debug)#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfDecryptionResult::equal(PdfDecryptionResult, PdfDecryptionResult) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfDecryptionResult::not_equal(x : PdfDecryptionResult, y : PdfDecryptionResult) -> Bool#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfDecryptionResult::to_repr(PdfDecryptionResult) -> Reprpub 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, Debug)fn PdfDocument::add_annotation(self : PdfDocument, page : PdfPage, annotation : PdfAnnotation) -> PdfPage raise PdfErrorfn PdfDocument::add_bookmark_title(self : PdfDocument, filename : String, use_title : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::add_bookmarks(self : PdfDocument, bookmarks : ArrayView[PdfBookmark]) -> PdfDocument raise PdfErrorfn PdfDocument::add_bookmarks_from_json(self : PdfDocument, json : Json, verify? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::add_bookmarks_from_text(self : PdfDocument, data : BytesView, verify? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::add_object_given_number(self : PdfDocument, number : Int, object : PdfObject, generation? : Int) -> Unitfn PdfDocument::add_page_labels(self : PdfDocument, progress : Bool, style : PdfPageLabelStyle, prefix : Bytes?, start_value : Int, page_numbers : ArrayView[Int]) -> PdfDocument raise PdfErrorfn PdfDocument::add_root(self : PdfDocument, page_root_number : Int, extras : ArrayView[(PdfName, PdfObject)]) -> Int raise PdfErrorfn PdfDocument::addtext_bookmark_for_page(self : PdfDocument, bookmarks : ArrayView[PdfBookmark], level : Int, page_number : Int) -> String raise PdfErrorfn PdfDocument::addtext_calc_textwidth(self : PdfDocument, page : PdfPage, font : PdfFont?, fontpack : PdfFontPack?, fontname : PdfName, font_size : Double, text : BytesView) -> Double raise PdfErrorfn PdfDocument::addtext_existing_font_resource(self : PdfDocument, page : PdfPage, fontname : PdfName) -> (PdfName, PdfObject) raise PdfErrorfn PdfDocument::addtext_line_page(self : PdfDocument, page : PdfPage, time : PdfStrftimeTime, lines : ArrayView[String], replacements : ArrayView[(String, () -> String)], font : PdfFont?, fontpack : PdfFontPack?, fontname : PdfName, font_object : PdfObject?, fontpack_font_objects : ArrayView[Int], font_size : Double, text : String, colour : PdfContentColour, position : PdfPosition, relative_to_box? : PdfName, horizontal_offset? : Double, vertical_offset? : Double, shift_x? : Double, shift_y? : Double, opacity? : Double, justification? : PdfAddTextJustification, rotation? : PdfAddTextRotation, outline? : Bool, line_width? : Double, underneath? : Bool, fast? : Bool, raw? : Bool, url_border? : Bool) -> PdfPage raise PdfErrorfn PdfDocument::addtext_line_widths(self : PdfDocument, page : PdfPage, font : PdfFont?, fontpack : PdfFontPack?, fontname : PdfName, font_size : Double, text : BytesView, expanded_lines : ArrayView[Bytes]) -> PdfAddTextLineWidths raise PdfErrorfn PdfDocument::addtext_opacity_resources(self : PdfDocument, resources : PdfObject, opacity : Double) -> (PdfObject, PdfName?) raise PdfErrorfn PdfDocument::addtext_page_lines(self : PdfDocument, page : PdfPage, time : PdfStrftimeTime, lines : ArrayView[String], replacements : ArrayView[(String, () -> String)], font : PdfFont?, fontpack : PdfFontPack?, fontname : PdfName, font_object : PdfObject?, fontpack_font_objects : ArrayView[Int], font_size : Double, line_spacing : Double, colour : PdfContentColour, position : PdfPosition, relative_to_box? : PdfName, opacity? : Double, justification? : PdfAddTextJustification, rotation? : PdfAddTextRotation, midline? : Bool, topline? : Bool, shift_x? : Double, shift_y? : Double, outline? : Bool, line_width? : Double, underneath? : Bool, fast? : Bool, raw? : Bool, url_border? : Bool) -> PdfPage raise PdfErrorfn PdfDocument::addtext_page_rest_with_annotations(self : PdfDocument, rest : PdfObject, annotations : ArrayView[PdfObject]) -> PdfObject raise PdfErrorfn PdfDocument::addtext_pages_with_font(self : PdfDocument, page_numbers : ArrayView[Int], lines : ArrayView[String], time : PdfStrftimeTime, bookmarks : ArrayView[PdfBookmark], font : PdfFont?, fontpack : PdfFontPack?, fontname : PdfName, font_object : PdfObject?, fontpack_font_objects : ArrayView[Int], font_size : Double, line_spacing : Double, colour : PdfContentColour, position : PdfPosition, filename? : String, bates? : Int, bates_pad? : Int?, relative_to_box? : PdfName, shift? : String, opacity? : Double, justification? : PdfAddTextJustification, rotation? : PdfAddTextRotation, midline? : Bool, topline? : Bool, outline? : Bool, line_width? : Double, underneath? : Bool, fast? : Bool, raw? : Bool, url_border? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::addtext_prepare_line(self : PdfDocument, page : PdfPage, time : PdfStrftimeTime, lines : ArrayView[String], replacements : ArrayView[(String, () -> String)], font : PdfFont?, fontpack : PdfFontPack?, fontname : PdfName, font_size : Double, text : String, position : PdfPosition, relative_to_box? : PdfName, horizontal_offset? : Double, vertical_offset? : Double, justification? : PdfAddTextJustification, rotation? : PdfAddTextRotation, raw? : Bool) -> PdfAddTextPreparedLine raise PdfErrorfn PdfDocument::addtext_rectangle(self : PdfDocument, page_numbers : ArrayView[Int], coord : String, colour : PdfContentColour, position : PdfPosition, relative_to_box? : PdfName, outline? : Bool, line_width? : Double, opacity? : Double, underneath? : Bool, fast? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::addtext_replacement_values(self : PdfDocument, bookmarks : ArrayView[PdfBookmark], page_number : Int, end_page : Int, filename : String, bates : Int, bates_pad : Int?) -> PdfAddTextReplacementValues raise PdfErrorfn PdfDocument::addtext_resource_setup(self : PdfDocument, page : PdfPage, font : PdfFont?, fontpack : PdfFontPack?, fontname : PdfName, font_object : PdfObject?, fontpack_font_objects : ArrayView[Int], opacity : Double) -> PdfAddTextResourceSetup raise PdfErrorfn PdfDocument::addtext_selected_font_object(self : PdfDocument, font : PdfFont?) -> PdfObject? raise PdfErrorfn PdfDocument::addtext_url_annotation_references(self : PdfDocument, text : String, urls : ArrayView[PdfAddTextUrl], measure : (String) -> Double raise PdfError, origin : Point2, horizontal_offset : Double, vertical_offset : Double, justification_offset : Double, rotation : Double, rotation_offset : Point2, page_rotation : Double, font : PdfFont?, fontname : String, font_size : Double, url_border : Bool) -> Array[PdfObject] raise PdfErrorfn PdfDocument::addtext_width_of_existing_font_resource(self : PdfDocument, page : PdfPage, fontname : PdfName, font_size : Double, text : BytesView) -> (PdfName, Double) raise PdfErrorfn PdfDocument::addtexts_with_font(self : PdfDocument, page_numbers : ArrayView[Int], text : String, time : PdfStrftimeTime, bookmarks : ArrayView[PdfBookmark], font : PdfFont?, fontpack : PdfFontPack?, fontname : PdfName, font_size : Double, line_spacing : Double, colour : PdfContentColour, position : PdfPosition, filename? : String, bates? : Int, bates_pad? : Int?, relative_to_box? : PdfName, shift? : String, opacity? : Double, justification? : PdfAddTextJustification, rotation? : PdfAddTextRotation, midline? : Bool, topline? : Bool, outline? : Bool, line_width? : Double, underneath? : Bool, fast? : Bool, raw? : Bool, url_border? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::addtexts_with_source(self : PdfDocument, page_numbers : ArrayView[Int], text : String, time : PdfStrftimeTime, bookmarks : ArrayView[PdfBookmark], font_source : PdfAddTextFontSource, fontname : PdfName, font_size : Double, line_spacing : Double, colour : PdfContentColour, position : PdfPosition, filename? : String, bates? : Int, bates_pad? : Int?, relative_to_box? : PdfName, shift? : String, opacity? : Double, justification? : PdfAddTextJustification, rotation? : PdfAddTextRotation, midline? : Bool, topline? : Bool, outline? : Bool, line_width? : Double, underneath? : Bool, fast? : Bool, raw? : Bool, url_border? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::all_pages_upright(self : PdfDocument, page_numbers : ArrayView[Int]) -> Bool raise PdfErrorfn PdfDocument::all_pages_upright_only(self : PdfDocument, page_numbers : ArrayView[Int]) -> Bool raise PdfErrorfn PdfDocument::annotations_json(self : PdfDocument, page_numbers : ArrayView[Int]) -> Json raise PdfErrorfn PdfDocument::annotations_json_blob(self : PdfDocument, page_numbers : ArrayView[Int]) -> Bytes raise PdfErrorfn PdfDocument::annotations_of_page(self : PdfDocument, page : PdfPage) -> Array[PdfAnnotation] raise PdfErrorfn PdfDocument::append_page_content(self : PdfDocument, page_numbers : ArrayView[Int], content : BytesView, before? : Bool, fast? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::append_page_content_multiple(self : PdfDocument, contents : ArrayView[Bytes], before? : Bool, fast? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::append_page_content_multiple_ops(self : PdfDocument, op_lists : ArrayView[Array[PdfContentOp]], before? : Bool, fast? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::append_page_content_ops(self : PdfDocument, page_numbers : ArrayView[Int], ops : ArrayView[PdfContentOp], before? : Bool, fast? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::apply_redaction_type(self : PdfDocument, annotation_type : String, page_numbers : ArrayView[Int]) -> Unitfn PdfDocument::attach_file(self : PdfDocument, filename : String, data : BytesView, keep_version? : Bool, page_number? : Int?, relationship? : String?, description? : String?) -> PdfDocument raise PdfErrorfn PdfDocument::black_fills(self : PdfDocument, page_numbers : ArrayView[Int], colour : PdfContentColour) -> PdfDocument raise PdfErrorfn PdfDocument::black_lines(self : PdfDocument, page_numbers : ArrayView[Int], colour : PdfContentColour) -> PdfDocument raise PdfErrorfn PdfDocument::black_text(self : PdfDocument, page_numbers : ArrayView[Int], colour : PdfContentColour) -> PdfDocument raise PdfErrorfn PdfDocument::bookmark_name_of_spec(self : PdfDocument, encoding : PdfMetadataEncoding, bookmarks : ArrayView[PdfBookmark], split_level : Int, spec : String, sequence : Int, filename : String, start_page : Int, end_page : Int) -> String raise PdfErrorfn PdfDocument::bookmarks_json(self : PdfDocument, json_preserve_actions? : Bool) -> Json raise PdfErrorfn PdfDocument::bookmarks_json_blob(self : PdfDocument, json_preserve_actions? : Bool) -> Bytes raise PdfErrorfn PdfDocument::bookmarks_open_to_level(self : PdfDocument, level : Int) -> PdfDocument raise PdfErrorfn PdfDocument::build_name_tree(self : PdfDocument, entries : ArrayView[(Bytes, PdfObject)]) -> PdfObjectfn PdfDocument::build_number_tree(self : PdfDocument, entries : ArrayView[(Int, PdfObject)]) -> PdfObjectfn PdfDocument::center_to_fit(self : PdfDocument, page_numbers : ArrayView[Int], sizes : ArrayView[(Double, Double)]) -> PdfDocument raise PdfErrorfn PdfDocument::center_to_fit_pages(self : PdfDocument, page_numbers : ArrayView[Int], sizes : ArrayView[(Double, Double)]) -> PdfDocument raise PdfErrorfn PdfDocument::change_boxes(self : PdfDocument, page : PdfPage, transform : (Double, Double, Double, Double) -> (Double, Double, Double, Double)) -> PdfPage raise PdfErrorfn PdfDocument::change_id(self : PdfDocument, path : String, get_time : () -> Double) -> Unit raise PdfErrorfn PdfDocument::change_pages(self : PdfDocument, pages : ArrayView[PdfPage], change_references? : Bool, matrices? : ArrayView[(Int, TransformMatrix)], changes? : ArrayView[(Int, Int)]) -> PdfDocument raise PdfErrorfn PdfDocument::change_pattern_matrices_page(self : PdfDocument, matrix : TransformMatrix, page : PdfPage) -> PdfPage raise PdfErrorfn PdfDocument::chop(self : PdfDocument, x : Int, y : Int, columns : Bool, btt : Bool, rtl : Bool, page_numbers : ArrayView[Int]) -> PdfDocument raise PdfErrorfn PdfDocument::chop_hv(self : PdfDocument, is_h : Bool, line : Double, columns : Bool, page_numbers : ArrayView[Int]) -> PdfDocument raise PdfErrorfn PdfDocument::colour_space_components(self : PdfDocument, resources : PdfObject, object : PdfObject) -> Int raise PdfErrorfn PdfDocument::colspace(self : PdfDocument, image : PdfObject, resources : PdfObject) -> PdfColourSpace raise PdfErrorfn PdfDocument::combine_pages(self : PdfDocument, overlay : PdfDocument, fast? : Bool, scale_to_fit? : Bool, overlay_is_under? : Bool, process_struct_tree? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::combine_pdf_resources(self : PdfDocument, first : PdfObject, second : PdfObject) -> PdfObjectfn PdfDocument::combine_pdf_rests(self : PdfDocument, first : PdfObject, second : PdfObject) -> PdfObjectfn PdfDocument::composition(self : PdfDocument, file_size : Int) -> Array[PdfCompositionEntry] raise PdfErrorfn PdfDocument::content_apply_extgstate_alpha_op(self : PdfDocument, state : PdfContentOperatorState, extgstate : PdfObject) -> PdfContentOperatorStatefn PdfDocument::content_apply_extgstate_compositing_op(self : PdfDocument, state : PdfContentOperatorState, extgstate : PdfObject) -> PdfContentOperatorStatefn PdfDocument::content_apply_extgstate_dash_op(self : PdfDocument, state : PdfContentOperatorState, extgstate : PdfObject) -> PdfContentOperatorState raise PdfErrorfn PdfDocument::content_apply_extgstate_font_op(self : PdfDocument, state : PdfContentOperatorState, extgstate : PdfObject) -> PdfContentOperatorState raise PdfErrorfn PdfDocument::content_apply_extgstate_graphics_parameter_op(self : PdfDocument, state : PdfContentOperatorState, extgstate : PdfObject) -> PdfContentOperatorStatefn PdfDocument::content_apply_extgstate_halftone_op(self : PdfDocument, state : PdfContentOperatorState, extgstate : PdfObject) -> PdfContentOperatorStatefn PdfDocument::content_apply_extgstate_overprint_op(self : PdfDocument, state : PdfContentOperatorState, extgstate : PdfObject) -> PdfContentOperatorStatefn PdfDocument::content_apply_extgstate_rendering_op(self : PdfDocument, state : PdfContentOperatorState, extgstate : PdfObject) -> PdfContentOperatorStatefn PdfDocument::content_apply_extgstate_resource_op(self : PdfDocument, state : PdfContentOperatorState, resources : PdfObject, name : PdfName) -> PdfContentOperatorState raise PdfErrorfn PdfDocument::content_apply_extgstate_text_op(self : PdfDocument, state : PdfContentOperatorState, extgstate : PdfObject) -> PdfContentOperatorStatefn PdfDocument::content_apply_extgstate_transfer_op(self : PdfDocument, state : PdfContentOperatorState, extgstate : PdfObject) -> PdfContentOperatorStatefn PdfDocument::content_apply_font_resource_op(self : PdfDocument, state : PdfContentOperatorState, resources : PdfObject, font_name : PdfName, font_size : Double) -> PdfContentOperatorState raise PdfErrorfn PdfDocument::content_apply_resource_op(self : PdfDocument, state : PdfContentOperatorState, resources : PdfObject, op : PdfContentOp) -> PdfContentOperatorResourceResult raise PdfErrorfn PdfDocument::content_apply_text_resource_op(self : PdfDocument, state : PdfContentOperatorState, resources : PdfObject, op : PdfContentOp) -> PdfContentOperatorTextResult raise PdfErrorfn PdfDocument::content_entries_of_ops(self : PdfDocument, mediabox : PdfRectangle, resources : PdfObject, ops : ArrayView[PdfContentOp]) -> Array[PdfContentJsonEntry] raise PdfErrorfn PdfDocument::content_entries_of_ops_recursive(self : PdfDocument, mediabox : PdfRectangle, resources : PdfObject, ops : ArrayView[PdfContentOp]) -> Array[PdfContentJsonEntry] raise PdfErrorfn PdfDocument::content_entries_of_page(self : PdfDocument, page : PdfPage) -> Array[PdfContentJsonEntry] raise PdfErrorfn PdfDocument::content_filter(self : PdfDocument, mediabox : PdfRectangle, resources : PdfObject, ops : ArrayView[PdfContentOp], predicate : (PdfContentJsonEntry) -> Bool) -> Array[PdfContentOp] raise PdfErrorfn PdfDocument::content_form_xobject_enter_state(self : PdfDocument, state : PdfContentOperatorState, resources : PdfObject, name : PdfName) -> PdfContentOperatorState? raise PdfErrorfn PdfDocument::content_form_xobject_ops(self : PdfDocument, resources : PdfObject, name : PdfName) -> Array[PdfContentOp]? raise PdfErrorfn PdfDocument::content_form_xobject_resources(self : PdfDocument, resources : PdfObject, name : PdfName) -> PdfObject? raise PdfErrorfn PdfDocument::content_image_entry_from_resources(self : PdfDocument, state : PdfContentOperatorState, resources : PdfObject, name : PdfName) -> PdfContentJsonEntry? raise PdfErrorfn PdfDocument::content_json_of_ops(self : PdfDocument, mediabox : PdfRectangle, resources : PdfObject, ops : ArrayView[PdfContentOp]) -> Json raise PdfErrorfn PdfDocument::content_read_axial_shading(self : PdfDocument, shading : PdfObject) -> PdfContentShadingKind raise PdfErrorfn PdfDocument::content_read_function_shading(self : PdfDocument, shading : PdfObject) -> PdfContentShadingKind raise PdfErrorfn PdfDocument::content_read_pattern(self : PdfDocument, resources : PdfObject, name : PdfName) -> PdfContentPattern? raise PdfErrorfn PdfDocument::content_read_radial_shading(self : PdfDocument, shading : PdfObject) -> PdfContentShadingKind raise PdfErrorfn PdfDocument::content_read_shading(self : PdfDocument, shading_matrix : TransformMatrix, shading_extgstate : PdfObject, shading : PdfObject) -> PdfContentShading raise PdfErrorfn PdfDocument::content_read_shading_pattern(self : PdfDocument, pattern : PdfObject) -> PdfContentPattern raise PdfErrorfn PdfDocument::content_shading_entry_from_resources(self : PdfDocument, state : PdfContentOperatorState, resources : PdfObject, name : PdfName) -> PdfContentJsonEntry?fn PdfDocument::contents_of_name_tree(self : PdfDocument, tree : PdfObject) -> Array[(PdfObject, PdfObject)]fn PdfDocument::copy_annotations_from(self : PdfDocument, source : PdfDocument, page_numbers : ArrayView[Int]) -> PdfDocument raise PdfErrorfn PdfDocument::copy_box(self : PdfDocument, page_numbers : ArrayView[Int], from_box : String, to_box : String, mediabox_if_missing? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::copy_font_from(self : PdfDocument, source : PdfDocument, font_name : String, font_page : Int, page_numbers : ArrayView[Int]) -> PdfDocument raise PdfErrorfn PdfDocument::copy_id_from(self : PdfDocument, source : PdfDocument, keep_version? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::copy_page_box(self : PdfDocument, page_numbers : ArrayView[Int], from_box : PdfName, to_box : PdfName, mediabox_if_missing? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::crop_pages(self : PdfDocument, page_numbers : ArrayView[Int], boxes : ArrayView[(Double, Double, Double, Double)], box_name? : PdfName) -> PdfDocument raise PdfErrorfn PdfDocument::crop_pdf_string(self : PdfDocument, page_numbers : ArrayView[Int], boxes : ArrayView[(Double, Double, Double, Double)], box_name? : String) -> PdfDocument raise PdfErrorfn 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 PdfErrorfn PdfDocument::decrypt_with_owner_password(self : PdfDocument, password : BytesView, no_encrypt_metadata? : Bool) -> PdfDecryptionResult? raise PdfErrorfn PdfDocument::decrypt_with_passwords(self : PdfDocument, user_password? : BytesView?, owner_password? : BytesView?, no_encrypt_metadata? : Bool) -> PdfDecryptionResult? raise PdfErrorfn PdfDocument::decrypt_with_user_password(self : PdfDocument, password : BytesView, no_encrypt_metadata? : Bool) -> PdfDecryptionResult? raise PdfErrorfn PdfDocument::dict_entries_json(self : PdfDocument, key : PdfName, utf8? : Bool) -> Bytes raise PdfErrorfn PdfDocument::dict_entries_json_string(self : PdfDocument, key : String, utf8? : Bool) -> Bytes raise PdfErrorfn PdfDocument::dict_entry_rendered_values(self : PdfDocument, key : PdfName) -> Array[Bytes] raise PdfErrorfn PdfDocument::dict_entry_rendered_values_string(self : PdfDocument, key : String) -> Array[Bytes] raise PdfErrorfn PdfDocument::draft(self : PdfDocument, only_remove : PdfName?, boxes : Bool, page_numbers : ArrayView[Int]) -> PdfDocument raise PdfErrorfn PdfDocument::draw(self : PdfDocument, page_numbers : ArrayView[Int], drawops : ArrayView[PdfDrawOp], struct_tree? : Bool, fast? : Bool, underneath? : Bool, filename? : String, bates? : Int, bates_pad? : Int?, time? : PdfStrftimeTime?, add_artifacts? : Bool, role_map? : String) -> PdfDocument raise PdfErrorfn PdfDocument::draw_special_text_context(self : PdfDocument, page_number : Int, filename? : String, bates? : Int, bates_pad? : Int?, time? : PdfStrftimeTime?) -> PdfDrawSpecialTextContext raise PdfErrorfn PdfDocument::embed_truetype(self : PdfDocument, fontfile : BytesView, fontname : String, codepoints : ArrayView[Int], encoding : PdfEncoding) -> PdfFontPack raise PdfErrorfn PdfDocument::encrypt_128bit(self : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], file_id? : BytesView) -> PdfDocument raise PdfErrorfn PdfDocument::encrypt_128bit_aesv2(self : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], encrypt_metadata? : Bool, file_id? : BytesView) -> PdfDocument raise PdfErrorfn 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 PdfErrorfn PdfDocument::encrypt_128bit_r4(self : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], encrypt_metadata? : Bool, file_id? : BytesView) -> PdfDocument raise PdfErrorfn 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 PdfErrorfn 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 PdfErrorfn 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 PdfErrorfn 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 PdfErrorfn PdfDocument::encrypt_40bit(self : PdfDocument, user_password : BytesView, owner_password : BytesView, denied_permissions : ArrayView[PdfPermission], file_id? : BytesView) -> PdfDocument raise PdfError#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfDocument::equal(PdfDocument, PdfDocument) -> Boolfn PdfDocument::extract_fontfile_bytes(self : PdfDocument, page_number : Int, font_name : String) -> Bytes? raise PdfErrorfn PdfDocument::extract_images_files(self : PdfDocument, page_numbers : ArrayView[Int], stem : String, encoding? : PdfMetadataEncoding, inline? : Bool, dedup? : Bool, dedup_per_page? : Bool) -> Array[PdfExtractedImageFile] raise PdfErrorfn PdfDocument::extract_single_image_files(self : PdfDocument, object_number : Int, stem : String) -> Array[PdfExtractedImageFile] raise PdfErrorfn PdfDocument::flip_pages_horizontally(self : PdfDocument, page_numbers : ArrayView[Int], fast? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::flip_pages_vertically(self : PdfDocument, page_numbers : ArrayView[Int], fast? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::font_from_name(self : PdfDocument, font_name : String, page_number : Int) -> PdfObject raise PdfErrorfn PdfDocument::font_table(self : PdfDocument, font_name : String, page_number : Int) -> Array[PdfFontTableEntry] raise PdfErrorfn PdfDocument::font_table_text(self : PdfDocument, font_name : String, page_number : Int) -> Bytes raise PdfErrorfn PdfDocument::fonts_json(self : PdfDocument, page_numbers : ArrayView[Int]) -> Json raise PdfErrorfn PdfDocument::fonts_json_blob(self : PdfDocument, page_numbers : ArrayView[Int]) -> Bytes raise PdfErrorfn PdfDocument::get_annotations(self : PdfDocument, encoding? : PdfMetadataEncoding) -> Array[(Int, Bytes)] raise PdfErrorfn PdfDocument::get_image_24bpp(self : PdfDocument, resources : PdfObject, image : PdfObject) -> PdfImage raise PdfErrorfn PdfDocument::hard_box(self : PdfDocument, page_numbers : ArrayView[Int], box_name : PdfName, mediabox_if_missing? : Bool, fast? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::hard_box_string(self : PdfDocument, page_numbers : ArrayView[Int], box_name : String, mediabox_if_missing? : Bool, fast? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::has_page_box(self : PdfDocument, page_number : Int, box_name : PdfName) -> Bool raise PdfErrorfn PdfDocument::hasbox_string(self : PdfDocument, page_number : Int, box_name : String) -> Bool raise PdfErrorfn PdfDocument::hflip_pdf(self : PdfDocument, page_numbers : ArrayView[Int], fast? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::image_colour_space(self : PdfDocument, image : PdfObject, resources : PdfObject) -> PdfColourSpace raise PdfErrorfn PdfDocument::image_resolution(self : PdfDocument, page_numbers : ArrayView[Int], dpi : Double, inline? : Bool) -> Array[(Int, String, Int, Int, Double, Double, Int)] raise PdfErrorfn PdfDocument::image_resolution_json(self : PdfDocument, page_numbers : ArrayView[Int], dpi : Double, inline? : Bool) -> Json raise PdfErrorfn PdfDocument::image_resolution_json_blob(self : PdfDocument, page_numbers : ArrayView[Int], dpi : Double, inline? : Bool) -> Bytes raise PdfErrorfn PdfDocument::images_json(self : PdfDocument, page_numbers : ArrayView[Int], inline? : Bool) -> Json raise PdfErrorfn PdfDocument::images_json_blob(self : PdfDocument, page_numbers : ArrayView[Int], inline? : Bool) -> Bytes raise PdfErrorfn PdfDocument::import_page(self : PdfDocument, source : PdfPageSource, page_number : Int) -> PdfImportedPage raise PdfErrorfn PdfDocument::impose(self : PdfDocument, x : Double, y : Double, fit? : Bool, columns? : Bool, rtl? : Bool, btt? : Bool, center? : Bool, margin? : Double, spacing? : Double, line_width? : Double, fast? : Bool, process_struct_tree? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::info_blob(self : PdfDocument, encoding? : PdfMetadataEncoding, unit? : PdfUnit) -> Bytes raise PdfErrorfn PdfDocument::info_json(self : PdfDocument, encoding? : PdfMetadataEncoding, unit? : PdfUnit) -> Json raise PdfErrorfn PdfDocument::info_json_blob(self : PdfDocument, encoding? : PdfMetadataEncoding, unit? : PdfUnit) -> Bytes raise PdfErrorfn PdfDocument::iter_objects(self : PdfDocument, callback : (Int, PdfObject) -> Unit raise) -> Unit raisefn PdfDocument::iter_objects_in_order(self : PdfDocument, callback : (Int, PdfObject) -> Unit raise) -> Unit raisefn PdfDocument::iter_objects_with_generation(self : PdfDocument, callback : (Int, Int, PdfObject) -> Unit raise) -> Unit raisefn PdfDocument::iter_pages(self : PdfDocument, page_numbers : ArrayView[Int], process : (Int, PdfPage) -> Unit raise PdfError) -> Unit raise PdfErrorfn PdfDocument::json_of_document(self : PdfDocument, utf8? : Bool, parse_content? : Bool, clean_strings? : Bool, no_stream_data? : Bool, decompress_streams? : Bool) -> Json raise PdfErrorfn PdfDocument::json_of_document_blob(self : PdfDocument, utf8? : Bool, parse_content? : Bool, clean_strings? : Bool, no_stream_data? : Bool, decompress_streams? : Bool) -> Bytes raise PdfErrorfn PdfDocument::json_of_object(self : PdfDocument, object : PdfObject, utf8? : Bool, clean_strings? : Bool, no_stream_data? : Bool, parse_content? : Bool) -> Json raise PdfErrorfn PdfDocument::json_to_output(self : PdfDocument, utf8? : Bool, parse_content? : Bool, no_stream_data? : Bool, decompress_streams? : Bool, clean_strings? : Bool) -> Bytes raise PdfErrorfn PdfDocument::list_annotations(self : PdfDocument, page_numbers : ArrayView[Int], encoding? : PdfMetadataEncoding) -> Bytes raise PdfErrorfn PdfDocument::list_bookmarks(self : PdfDocument, page_numbers : ArrayView[Int], encoding? : PdfMetadataEncoding, json? : Bool, json_preserve_actions? : Bool) -> Bytes raise PdfErrorfn PdfDocument::list_fonts(self : PdfDocument, page_numbers : ArrayView[Int]) -> Array[PdfFontListEntry] raise PdfErrorfn PdfDocument::list_fonts_text(self : PdfDocument, page_numbers : ArrayView[Int]) -> Bytes raise PdfErrorfn PdfDocument::lookup_chain(self : PdfDocument, start : PdfObject, keys : ArrayView[PdfName]) -> PdfObject?fn PdfDocument::lookup_direct_or_array(self : PdfDocument, name : PdfName, object : PdfObject) -> PdfObject?fn PdfDocument::lookup_direct_or_else(self : PdfDocument, first_key : PdfName, second_key : PdfName, object : PdfObject) -> PdfObject?fn PdfDocument::lookup_required(self : PdfDocument, key : PdfName, object : PdfObject, error : PdfError) -> PdfObject raise PdfErrorfn PdfDocument::map_objects_in_place(self : PdfDocument, transform : (PdfObject) -> PdfObject) -> Unitfn[T] PdfDocument::map_pages(self : PdfDocument, page_numbers : ArrayView[Int], process : (Int, PdfPage) -> T raise PdfError) -> Array[T] raise PdfErrorfn PdfDocument::merge_name_trees_no_clash(self : PdfDocument, trees : ArrayView[PdfObject]) -> PdfObjectfn PdfDocument::merge_number_trees_no_clash(self : PdfDocument, trees : ArrayView[PdfObject]) -> PdfObjectfn PdfDocument::missing_fonts(self : PdfDocument, page_numbers : ArrayView[Int]) -> Array[PdfMissingFontEntry] raise PdfErrorfn PdfDocument::missing_fonts_return(self : PdfDocument, page_numbers : ArrayView[Int]) -> Array[(Int, String, String, String, String)] raise PdfErrorfn PdfDocument::missing_fonts_text(self : PdfDocument, page_numbers : ArrayView[Int]) -> Bytes raise PdfErrorfn PdfDocument::name_tree_lookup(self : PdfDocument, key : BytesView, tree : PdfObject) -> PdfObject?fn PdfDocument::name_tree_lookup_object(self : PdfDocument, key : PdfObject, tree : PdfObject) -> PdfObject?#deprecated("implicit trait-method promotion is being removed; call via the trait")
fn PdfDocument::not_equal(x : PdfDocument, y : PdfDocument) -> Boolfn PdfDocument::output_page_info(self : PdfDocument, page_numbers : ArrayView[Int], unit? : PdfUnit, json? : Bool, raisejson? : Bool) -> Bytes raise PdfErrorfn PdfDocument::pad_after(self : PdfDocument, page_numbers : ArrayView[Int], pad_with? : PdfDocument?) -> PdfDocument raise PdfErrorfn PdfDocument::pad_before(self : PdfDocument, page_numbers : ArrayView[Int], pad_with? : PdfDocument?) -> PdfDocument raise PdfErrorfn PdfDocument::page_content_json(self : PdfDocument, page_numbers : ArrayView[Int]) -> Json raise PdfErrorfn PdfDocument::page_info_json(self : PdfDocument, page_numbers : ArrayView[Int], unit? : PdfUnit) -> Json raise PdfErrorfn PdfDocument::page_info_json_blob(self : PdfDocument, page_numbers : ArrayView[Int], unit? : PdfUnit) -> Bytes raise PdfErrorfn PdfDocument::page_info_text(self : PdfDocument, page_numbers : ArrayView[Int], unit? : PdfUnit) -> Bytes raise PdfErrorfn PdfDocument::page_number_of_target(self : PdfDocument, destination : PdfDestination) -> Int raise PdfErrorfn PdfDocument::parse_bookmark_json(self : PdfDocument, json : Json, verify? : Bool) -> Array[PdfBookmark] raise PdfErrorfn PdfDocument::parse_bookmark_text(self : PdfDocument, data : BytesView, verify? : Bool) -> Array[PdfBookmark] raise PdfErrorfn PdfDocument::parse_content_bytes_with_resources(self : PdfDocument, resources : PdfObject, data : Bytes) -> Array[PdfContentOp] raise PdfErrorfn PdfDocument::parse_content_ops(self : PdfDocument, streams : ArrayView[PdfObject]) -> Array[PdfContentOp] raise PdfErrorfn PdfDocument::parse_content_ops_with_resources(self : PdfDocument, resources : PdfObject, streams : ArrayView[PdfObject]) -> Array[PdfContentOp] raise PdfErrorfn PdfDocument::parse_content_view_with_resources(self : PdfDocument, resources : PdfObject, data : BytesView) -> Array[PdfContentOp] raise PdfErrorfn PdfDocument::parse_coordinate_rectangle(self : PdfDocument, text : String) -> PdfCoordRectangle raise PdfErrorfn PdfDocument::parse_coordinate_rectangles(self : PdfDocument, text : String) -> Array[PdfCoordRectangle] raise PdfErrorfn PdfDocument::parse_coordinate_tuple(self : PdfDocument, text : String) -> (Double, Double) raise PdfErrorfn PdfDocument::parse_coordinates(self : PdfDocument, text : String) -> Array[Point2] raise PdfErrorfn PdfDocument::parse_coordinates_tuple(self : PdfDocument, text : String) -> Array[(Double, Double)] raise PdfErrorfn PdfDocument::parse_function(self : PdfDocument, function_object : PdfObject) -> PdfFunction raise PdfErrorfn PdfDocument::parse_matrix(self : PdfDocument, key : PdfName, object : PdfObject) -> TransformMatrix raise PdfErrorfn PdfDocument::parse_rectangle(self : PdfDocument, object : PdfObject) -> PdfRectangle raise PdfErrorfn PdfDocument::parse_units_string(self : PdfDocument, page : PdfPage, text : String) -> Array[Double] raise PdfErrorfn PdfDocument::pdf_decode_stream(self : PdfDocument, object : PdfObject) -> PdfObject raise PdfErrorfn PdfDocument::pdf_decode_stream_until_unknown(self : PdfDocument, object : PdfObject) -> PdfObject raise PdfErrorfn PdfDocument::pdf_image_object_of_png_data(self : PdfDocument, data : BytesView) -> PdfObject raise PdfErrorfn PdfDocument::pdf_of_pages(self : PdfDocument, page_numbers : ArrayView[Int], retain_numbering? : Bool, process_struct_tree? : Bool) -> PdfDocument raise PdfErrorfn PdfDocument::pdf_type_typeset(self : PdfDocument, process_struct_tree : Bool, lmargin : Double, rmargin : Double, tmargin : Double, bmargin : Double, paper : PaperSize, elements : ArrayView[PdfTypeElement]) -> PdfTypeTypesetResult raise PdfErrorfn PdfDocument::portfolio(self : PdfDocument, entries : ArrayView[PdfPortfolioEntry], mod_date? : Bytes?) -> PdfDocument raise PdfErrorfn PdfDocument::postpend_operators(self : PdfDocument, page : PdfPage, ops : ArrayView[PdfContentOp], fast? : Bool) -> PdfPage raise PdfErrorfn PdfDocument::prepend_operators(self : PdfDocument, page : PdfPage, ops : ArrayView[PdfContentOp], fast? : Bool) -> PdfPage raise PdfErrorfn PdfDocument::presentation(self : PdfDocument, range : ArrayView[Int], transition : String?, delay : Double?, horizontal : Bool, inward : Bool, direction : Int, effect_duration : Double) -> PdfDocument raise PdfErrorfn PdfDocument::print_font_table(self : PdfDocument, font_name : String, page_number : Int) -> Bytes raise PdfErrorfn PdfDocument::print_fonts(self : PdfDocument, page_numbers : ArrayView[Int], json? : Bool) -> Bytes raise PdfErrorfn PdfDocument::process_pages(self : PdfDocument, page_numbers : ArrayView[Int], process : (Int, PdfPage) -> (PdfPage, Int, TransformMatrix) raise PdfError) -> PdfDocument raise PdfErrorfn PdfDocument::process_xobjects(self : PdfDocument, page : PdfPage, process : (PdfDocument, PdfObject, ArrayView[PdfObject]) -> Array[PdfObject] raise PdfError) -> Unit raise PdfErrorfn PdfDocument::read_annotation(self : PdfDocument, annotation : PdfObject) -> PdfAnnotation raise PdfErrorfn PdfDocument::read_bookmarks(self : PdfDocument, preserve_actions? : Bool) -> Array[PdfBookmark] raise PdfErrorfn PdfDocument::read_cid_system_info(self : PdfDocument, dictionary : PdfObject) -> PdfCIDSystemInfo raise PdfErrorfn PdfDocument::read_cidkeyed_font(self : PdfDocument, font : PdfObject) -> PdfCIDKeyedFont raise PdfErrorfn PdfDocument::read_colour_space(self : PdfDocument, resources : PdfObject, object : PdfObject) -> PdfColourSpace? raise PdfErrorfn PdfDocument::read_destination(self : PdfDocument, object : PdfObject, shallow? : Bool) -> PdfDestination raise PdfErrorfn PdfDocument::read_font_descriptor(self : PdfDocument, font : PdfObject) -> PdfFontDescriptor? raise PdfError