View on GitHub

PDF-Tags-raku

Tagged PDF writer

[Raku PDF Project] / [PDF-Tags Module] / PDF::Tags :: Attr

class PDF::Tags::Attr

Attribute node

Description

Objects of this class hold a single attribute value.

Note that attributes values may contain numbers, strings or arrays as below:

cos type example
name Placement=Block
number Height=258
array BBox=34 474 564 738

Methods

name

method name() returns Str

The attribute name, e.g. BBox.

value

method value() returns Any

The value of the attribute either a string, a number, or an array of numbers.

method Str (alias text)

method Str() returns Str

The value as a text string. In the case of an array, the values are space separated.

method gist

method gist returns Str
say $table-elem<@BBox>.gist; # BBox=34 474 564 738

$elem.gist is equivalent to $elem.name ~ '=' ~ $elem.text

method parent

method parent returns PDF::Tags::Node::Parent

The parent node; of type PDF::Tags, PDF::Tags::Elem, or PDF::Tags::Mark