Ops

[Raku PDF Project] / [PDF-Content Module] / PDF::Content :: Ops

class PDF::Content::Ops

A graphics machine for building and interpeting PDF Content operator streams

Description

The PDF::Content::Ops role implements methods and mnemonics for the full operator table, as defined in specification [PDF 1.7 Appendix A]:

head

Methods

method font-face

method font-face() returns PDF::COS::Dict

returns the current graphics font dictionary resource

method font-size

method font-size() returns Numeric

returns the current graphics font size

method tags

method tags() returns PDF::Content::Tag::NodeSet

returns the current tags status

multi method gsaves

multi method gsaves(
    :$delta! where { ... }
) returns Array

return graphics gsave stack, including changed variables only

multi method gsaves

multi method gsaves() returns Array

return graphics gsave stack, including all graphics variables

multi method graphics-state

multi method graphics-state(
    :$delta!
) returns Hash

return locally updated graphics state variables

multi method graphics-state

multi method graphics-state() returns Mu

return all current graphics state variables

method current-point

method current-point() returns List

return current point

This method returns the x,y position of current point in a path context, or an undefined list otherwise.

multi method op

multi method op(
    Pair $_ where { ... }
) returns Mu

process operator quarantined by PDF::Grammar::Content / PDF::Native::COS as either an unknown operator or having an incorrect argument list

multi method op

multi method op(
    *@args is copy
) returns Mu

Process a parsed graphics operation

multi method ops

multi method ops(
    Str $ops
) returns Array

Parse and process graphics operations

multi method ops

multi method ops(
    @ops
) returns Array

Parse and process a list of graphics operations

method add-comment

method add-comment(
    Str $_
) returns Mu

Add a comment to the content stream

multi sub parse-content

multi sub parse-content(
    Str $content where { ... }
) returns Mu

parse, but don't process PDF content operators

method finish

method finish() returns Mu

Finish a content stream

has Str $!content-cache

serialize content into a string. indent blocks for readability

method content-dump

method content-dump() returns Seq

serialized current content as a sequence of strings - for debugging/testing

method FALLBACK

method FALLBACK(
    $method,
    |c
) returns Mu

Treat operator mnemonics as methods

PDF::Content v0.9.11

PDF content related classes; including text, images, fonts and graphics

Authors

  • David Warring

License

Artistic-2.0

Dependencies

Base64::NativeColorCompress::Zlib::RawFont::AFM:ver<1.24.10+>Native::PackingMethod::AlsoJSON::FastPDF:ver<0.6.8+>PDF::Grammar:ver<0.3.2+>

Test Dependencies

Provides

  • PDF::Content
  • PDF::Content::API
  • PDF::Content::Canvas
  • PDF::Content::Color
  • PDF::Content::Font
  • PDF::Content::Font::CoreFont
  • PDF::Content::Font::Enc::Glyphic
  • PDF::Content::Font::Enc::Type1
  • PDF::Content::Font::Encoder
  • PDF::Content::Font::Encodings
  • PDF::Content::FontObj
  • PDF::Content::Image
  • PDF::Content::Image::GIF
  • PDF::Content::Image::JPEG
  • PDF::Content::Image::PDF
  • PDF::Content::Image::PNG
  • PDF::Content::Interface
  • PDF::Content::Matrix
  • PDF::Content::Ops
  • PDF::Content::Page
  • PDF::Content::PageNode
  • PDF::Content::PageTree
  • PDF::Content::ResourceDict
  • PDF::Content::Resourced
  • PDF::Content::Tag
  • PDF::Content::Text::Block
  • PDF::Content::Text::Box
  • PDF::Content::Text::Line
  • PDF::Content::Text::Style
  • PDF::Content::XObject
  • X::PDF::Content

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.

Built with Podlite — the markup and publishing tools behind this site.