Class

[Raku PDF Project] / [PDF-Class Module]

class PDF::Class

PDF entry-point. either a trailer dict or an XRef stream

Synopsis

use PDF::Class;
use PDF::Catalog;
use PDF::Page;
use PDF::Info;

my PDF::Class $pdf .= open: "t/helloworld.pdf";

# vivify Info entry; set title
given $pdf.Info //= {} -> PDF::Info $_ {
    .Title = 'Hello World!';
    .ModDate = DateTime.now; # PDF::Class sets this anyway...
}

# modify Viewer Preferences
my PDF::Catalog $catalog = $pdf.Root;
given $catalog.ViewerPreferences //= {} {
    .HideToolbar = True;
}

# add a page ...
my PDF::Page $new-page = $pdf.add-page;
$new-page.gfx.say: "New last page!";

# save the updated pdf
$pdf.save-as: "tmp/pdf-updated.pdf";

Description

This is the base class for opening or creating a document as a PDF class. the document can then be manipulated as a library of classes that represent the majority of objects that can be found in a PDF file.

PDF::Class v0.5.30

PDF Document Object Model

Authors

  • David Warring

License

Artistic-2.0

Dependencies

PDF::LitePDF:ver<0.6.13+>PDF::Grammar:ver<0.3.2+>PDF::Content:ver<0.8.3+>JSON::Fast

Test Dependencies

Provides

  • PDF::AcroForm
  • PDF::Action
  • PDF::Action::GoTo
  • PDF::Action::GoToR
  • PDF::Action::JavaScript
  • PDF::Action::Launch
  • PDF::Action::Named
  • PDF::Action::Sound
  • PDF::Action::SubmitForm
  • PDF::Action::Thread
  • PDF::Action::URI
  • PDF::Annot
  • PDF::Annot::AdditionalActions
  • PDF::Annot::Caret
  • PDF::Annot::Circle
  • PDF::Annot::FileAttachment
  • PDF::Annot::Highlight
  • PDF::Annot::Link
  • PDF::Annot::Popup
  • PDF::Annot::Square
  • PDF::Annot::Squiggly
  • PDF::Annot::StrikeOut
  • PDF::Annot::Text
  • PDF::Annot::ThreeD
  • PDF::Annot::Underline
  • PDF::Annot::Widget
  • PDF::Annot::_Markup
  • PDF::Annot::_TextMarkup
  • PDF::Appearance
  • PDF::Attributes
  • PDF::Attributes::Layout
  • PDF::Attributes::List
  • PDF::Attributes::PrintField
  • PDF::Attributes::Table
  • PDF::Attributes::UserProperties
  • PDF::Bead-Thread
  • PDF::Border
  • PDF::CIDSystemInfo
  • PDF::CMap
  • PDF::Catalog
  • PDF::Catalog::AdditionalActions
  • PDF::Class
  • PDF::Class::Defs
  • PDF::Class::FieldContainer
  • PDF::Class::Image
  • PDF::Class::Loader
  • PDF::Class::OptionalContent
  • PDF::Class::OutlineNode
  • PDF::Class::PageRef
  • PDF::Class::StructItem
  • PDF::Class::ThreeD
  • PDF::Class::Type
  • PDF::Class::Util
  • PDF::ColorSpace
  • PDF::ColorSpace::CalGray
  • PDF::ColorSpace::CalRGB
  • PDF::ColorSpace::DeviceN
  • PDF::ColorSpace::ICCBased
  • PDF::ColorSpace::Indexed
  • PDF::ColorSpace::Lab
  • PDF::ColorSpace::Pattern
  • PDF::ColorSpace::Separation
  • PDF::Destination
  • PDF::EmbeddedFile
  • PDF::Encoding
  • PDF::ExData::Markup3D
  • PDF::ExtGState
  • PDF::Field
  • PDF::Field::AdditionalActions
  • PDF::Field::Button
  • PDF::Field::Choice
  • PDF::Field::Signature
  • PDF::Field::Text
  • PDF::Filespec
  • PDF::Font
  • PDF::Font::CIDFont
  • PDF::Font::CIDFontType0
  • PDF::Font::CIDFontType2
  • PDF::Font::MMType1
  • PDF::Font::TrueType
  • PDF::Font::Type0
  • PDF::Font::Type1
  • PDF::Font::Type3
  • PDF::FontDescriptor
  • PDF::FontDescriptor::CID
  • PDF::FontFile
  • PDF::FontStream
  • PDF::Function
  • PDF::Function::Exponential
  • PDF::Function::PostScript
  • PDF::Function::Sampled
  • PDF::Function::Stitching
  • PDF::Group
  • PDF::Group::Transparency
  • PDF::ICCProfile
  • PDF::Image
  • PDF::Info
  • PDF::MCR
  • PDF::MarkInfo
  • PDF::Mask
  • PDF::Mask::Alpha
  • PDF::Mask::Luminosity
  • PDF::Metadata::XML
  • PDF::NameTree
  • PDF::Names
  • PDF::Namespace
  • PDF::NumberTree
  • PDF::OBJR
  • PDF::OCG
  • PDF::OCMD
  • PDF::Outline
  • PDF::Outlines
  • PDF::OutputIntent
  • PDF::Page
  • PDF::Page::AdditionalActions
  • PDF::Pages
  • PDF::Pattern
  • PDF::Pattern::Shading
  • PDF::Pattern::Tiling
  • PDF::Resources
  • PDF::Shading
  • PDF::Shading::Axial
  • PDF::Shading::Coons
  • PDF::Shading::FreeForm
  • PDF::Shading::Function
  • PDF::Shading::Lattice
  • PDF::Shading::Radial
  • PDF::Shading::Tensor
  • PDF::Signature
  • PDF::Sound
  • PDF::StructElem
  • PDF::StructTreeRoot
  • PDF::ViewerPreferences
  • PDF::XObject
  • PDF::XObject::Form
  • PDF::XObject::Image
  • PDF::XObject::PS

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.