# typed: true # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `pdf-core` gem. # Please instead update this file by running `bin/tapioca gem pdf-core`. # source://pdf-core//lib/pdf/core/pdf_object.rb#11 module PDF; end # source://pdf-core//lib/pdf/core/pdf_object.rb#12 module PDF::Core private # source://prawn/1.3.0/lib/prawn/security.rb#216 def EncryptedPdfObject(obj, key, id, gen, in_content_stream = T.unsafe(nil)); end # Serializes Ruby objects to their PDF equivalents. Most primitive objects # will work as expected, but please note that Name objects are represented # by Ruby Symbol objects and Dictionary objects are represented by Ruby hashes # (keyed by symbols) # # Examples: # # PdfObject(true) #=> "true" # PdfObject(false) #=> "false" # PdfObject(1.2124) #=> "1.2124" # PdfObject("foo bar") #=> "(foo bar)" # PdfObject(:Symbol) #=> "/Symbol" # PdfObject(["foo",:bar, [1,2]]) #=> "[foo /bar [1 2]]" # # source://pdf-core//lib/pdf/core/pdf_object.rb#40 def PdfObject(obj, in_content_stream = T.unsafe(nil)); end # source://pdf-core//lib/pdf/core/reference.rb#74 def Reference(*args, &block); end # encodes any string into a hex representation. The result is a string # with only 0-9 and a-f characters. That result is valid ASCII so tag # it as such to account for behaviour of different ruby VMs # # source://pdf-core//lib/pdf/core/pdf_object.rb#22 def string_to_hex(str); end # source://pdf-core//lib/pdf/core/pdf_object.rb#15 def utf8_to_utf16(str); end class << self # source://prawn/1.3.0/lib/prawn/security.rb#216 def EncryptedPdfObject(obj, key, id, gen, in_content_stream = T.unsafe(nil)); end # Serializes Ruby objects to their PDF equivalents. Most primitive objects # will work as expected, but please note that Name objects are represented # by Ruby Symbol objects and Dictionary objects are represented by Ruby hashes # (keyed by symbols) # # Examples: # # PdfObject(true) #=> "true" # PdfObject(false) #=> "false" # PdfObject(1.2124) #=> "1.2124" # PdfObject("foo bar") #=> "(foo bar)" # PdfObject(:Symbol) #=> "/Symbol" # PdfObject(["foo",:bar, [1,2]]) #=> "[foo /bar [1 2]]" # # source://pdf-core//lib/pdf/core/pdf_object.rb#40 def PdfObject(obj, in_content_stream = T.unsafe(nil)); end # source://pdf-core//lib/pdf/core/reference.rb#74 def Reference(*args, &block); end # encodes any string into a hex representation. The result is a string # with only 0-9 and a-f characters. That result is valid ASCII so tag # it as such to account for behaviour of different ruby VMs # # source://pdf-core//lib/pdf/core/pdf_object.rb#22 def string_to_hex(str); end # source://pdf-core//lib/pdf/core/pdf_object.rb#15 def utf8_to_utf16(str); end end end # Provides very low-level support for annotations. # # source://pdf-core//lib/pdf/core/annotations.rb#13 module PDF::Core::Annotations # Adds a new annotation (section 8.4 in PDF spec) to the current page. # +options+ must be a Hash describing the annotation. # # source://pdf-core//lib/pdf/core/annotations.rb#18 def annotate(options); end # A convenience method for creating Link annotations. +rect+ must be an array # of four numbers, describing the bounds of the annotation. The +options+ hash # should include either :Dest (describing the target destination, usually as a # string that has been recorded in the document's Dests tree), or :A (describing # an action to perform on clicking the link), or :PA (for describing a URL to # link to). # # source://pdf-core//lib/pdf/core/annotations.rb#41 def link_annotation(rect, options = T.unsafe(nil)); end # A convenience method for creating Text annotations. +rect+ must be an array # of four numbers, describing the bounds of the annotation. +contents+ should # be a string, to be shown when the annotation is activated. # # source://pdf-core//lib/pdf/core/annotations.rb#29 def text_annotation(rect, contents, options = T.unsafe(nil)); end private # source://pdf-core//lib/pdf/core/annotations.rb#48 def sanitize_annotation_hash(options); end end # This is used to differentiate strings that must be encoded as # a byte string, such as binary data from encrypted strings. # # source://pdf-core//lib/pdf/core/byte_string.rb#6 class PDF::Core::ByteString < ::String; end # source://pdf-core//lib/pdf/core/destinations.rb#11 module PDF::Core::Destinations # Adds a new destination to the dests name tree (see #dests). The # +reference+ parameter will be converted into a PDF::Core::Reference if # it is not already one. # # source://pdf-core//lib/pdf/core/destinations.rb#28 def add_dest(name, reference); end # Return a Dest specification that will fit the given page into the # viewport. # # source://pdf-core//lib/pdf/core/destinations.rb#43 def dest_fit(dest_page = T.unsafe(nil)); end # Return a Dest specfication that will fit the given page's bounding box # into the viewport. # # source://pdf-core//lib/pdf/core/destinations.rb#71 def dest_fit_bounds(dest_page = T.unsafe(nil)); end # Same as #dest_fit_horizontally, but works on the page's bounding box # instead of the entire page. # # source://pdf-core//lib/pdf/core/destinations.rb#78 def dest_fit_bounds_horizontally(top, dest_page = T.unsafe(nil)); end # Same as #dest_fit_vertically, but works on the page's bounding box # instead of the entire page. # # source://pdf-core//lib/pdf/core/destinations.rb#85 def dest_fit_bounds_vertically(left, dest_page = T.unsafe(nil)); end # Return a Dest specification that will fit the given page horizontally # into the viewport, aligned vertically at the given top coordinate. # # source://pdf-core//lib/pdf/core/destinations.rb#50 def dest_fit_horizontally(top, dest_page = T.unsafe(nil)); end # Return a Dest specification that will fit the given rectangle into the # viewport, for the given page. # # source://pdf-core//lib/pdf/core/destinations.rb#64 def dest_fit_rect(left, bottom, right, top, dest_page = T.unsafe(nil)); end # Return a Dest specification that will fit the given page vertically # into the viewport, aligned horizontally at the given left coordinate. # # source://pdf-core//lib/pdf/core/destinations.rb#57 def dest_fit_vertically(left, dest_page = T.unsafe(nil)); end # Return a Dest specification for a specific location (and optional zoom # level). # # source://pdf-core//lib/pdf/core/destinations.rb#36 def dest_xyz(left, top, zoom = T.unsafe(nil), dest_page = T.unsafe(nil)); end # The Dests name tree in the Name dictionary (see Prawn::Document::Internal#names). # This name tree is used to store named destinations (PDF spec 8.2.1). # (For more on name trees, see section 3.8.4 in the PDF spec.) # # source://pdf-core//lib/pdf/core/destinations.rb#20 def dests; end end # The maximum number of children to fit into a single node in the Dests tree. # # source://pdf-core//lib/pdf/core/destinations.rb#14 PDF::Core::Destinations::NAME_TREE_CHILDREN_LIMIT = T.let(T.unsafe(nil), Integer) # source://pdf-core//lib/pdf/core/document_state.rb#3 class PDF::Core::DocumentState # @return [DocumentState] a new instance of DocumentState # # source://pdf-core//lib/pdf/core/document_state.rb#4 def initialize(options); end # source://pdf-core//lib/pdf/core/document_state.rb#59 def before_render_actions(doc); end # Returns the value of attribute before_render_callbacks. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def before_render_callbacks; end # Sets the attribute before_render_callbacks # # @param value the value to set the attribute before_render_callbacks to. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def before_render_callbacks=(_arg0); end # Returns the value of attribute compress. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def compress; end # Sets the attribute compress # # @param value the value to set the attribute compress to. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def compress=(_arg0); end # Returns the value of attribute encrypt. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def encrypt; end # Sets the attribute encrypt # # @param value the value to set the attribute encrypt to. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def encrypt=(_arg0); end # Returns the value of attribute encryption_key. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def encryption_key; end # Sets the attribute encryption_key # # @param value the value to set the attribute encryption_key to. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def encryption_key=(_arg0); end # source://pdf-core//lib/pdf/core/document_state.rb#49 def insert_page(page, page_number); end # source://pdf-core//lib/pdf/core/document_state.rb#41 def normalize_metadata(options); end # source://pdf-core//lib/pdf/core/document_state.rb#55 def on_page_create_action(doc); end # Returns the value of attribute on_page_create_callback. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def on_page_create_callback; end # Sets the attribute on_page_create_callback # # @param value the value to set the attribute on_page_create_callback to. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def on_page_create_callback=(_arg0); end # Returns the value of attribute page. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def page; end # Sets the attribute page # # @param value the value to set the attribute page to. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def page=(_arg0); end # source://pdf-core//lib/pdf/core/document_state.rb#63 def page_count; end # Returns the value of attribute pages. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def pages; end # Sets the attribute pages # # @param value the value to set the attribute pages to. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def pages=(_arg0); end # source://pdf-core//lib/pdf/core/document_state.rb#30 def populate_pages_from_store(document); end # source://pdf-core//lib/pdf/core/document_state.rb#67 def render_body(output); end # Returns the value of attribute skip_encoding. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def skip_encoding; end # Sets the attribute skip_encoding # # @param value the value to set the attribute skip_encoding to. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def skip_encoding=(_arg0); end # Returns the value of attribute store. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def store; end # Sets the attribute store # # @param value the value to set the attribute store to. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def store=(_arg0); end # Returns the value of attribute trailer. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def trailer; end # Sets the attribute trailer # # @param value the value to set the attribute trailer to. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def trailer=(_arg0); end # Returns the value of attribute version. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def version; end # Sets the attribute version # # @param value the value to set the attribute version to. # # source://pdf-core//lib/pdf/core/document_state.rb#26 def version=(_arg0); end end # source://pdf-core//lib/pdf/core.rb#22 module PDF::Core::Errors; end # This error is raise when trying to restore a graphic state that # # source://pdf-core//lib/pdf/core.rb#27 class PDF::Core::Errors::EmptyGraphicStateStack < ::StandardError; end # This error is raised when PdfObject() fails # # source://pdf-core//lib/pdf/core.rb#24 class PDF::Core::Errors::FailedObjectConversion < ::StandardError; end # This error is raised when Document#page_layout is set to anything # other than :portrait or :landscape # # source://pdf-core//lib/pdf/core.rb#31 class PDF::Core::Errors::InvalidPageLayout < ::StandardError; end # source://pdf-core//lib/pdf/core/filter_list.rb#3 class PDF::Core::FilterList # @return [FilterList] a new instance of FilterList # # source://pdf-core//lib/pdf/core/filter_list.rb#4 def initialize; end # source://pdf-core//lib/pdf/core/filter_list.rb#8 def <<(filter); end # source://pdf-core//lib/pdf/core/filter_list.rb#34 def decode_params; end # source://pdf-core//lib/pdf/core/filter_list.rb#44 def each(&block); end # source://pdf-core//lib/pdf/core/filter_list.rb#40 def inspect; end # source://pdf-core//lib/pdf/core/filter_list.rb#28 def names; end # source://pdf-core//lib/pdf/core/filter_list.rb#23 def normalized; end # source://pdf-core//lib/pdf/core/filter_list.rb#23 def to_a; end end # source://pdf-core//lib/pdf/core/filters.rb#13 module PDF::Core::Filters; end # Pass through stub # # source://pdf-core//lib/pdf/core/filters.rb#25 module PDF::Core::Filters::DCTDecode class << self # source://pdf-core//lib/pdf/core/filters.rb#30 def decode(stream, params = T.unsafe(nil)); end # source://pdf-core//lib/pdf/core/filters.rb#26 def encode(stream, params = T.unsafe(nil)); end end end # source://pdf-core//lib/pdf/core/filters.rb#14 module PDF::Core::Filters::FlateDecode class << self # source://pdf-core//lib/pdf/core/filters.rb#19 def decode(stream, params = T.unsafe(nil)); end # source://pdf-core//lib/pdf/core/filters.rb#15 def encode(stream, params = T.unsafe(nil)); end end end # NOTE: This class may be a good candidate for a copy-on-write hash. # # source://pdf-core//lib/pdf/core/graphics_state.rb#47 class PDF::Core::GraphicState # @return [GraphicState] a new instance of GraphicState # # source://pdf-core//lib/pdf/core/graphics_state.rb#51 def initialize(previous_state = T.unsafe(nil)); end # Returns the value of attribute cap_style. # # source://pdf-core//lib/pdf/core/graphics_state.rb#48 def cap_style; end # Sets the attribute cap_style # # @param value the value to set the attribute cap_style to. # # source://pdf-core//lib/pdf/core/graphics_state.rb#48 def cap_style=(_arg0); end # Returns the value of attribute color_space. # # source://pdf-core//lib/pdf/core/graphics_state.rb#48 def color_space; end # Sets the attribute color_space # # @param value the value to set the attribute color_space to. # # source://pdf-core//lib/pdf/core/graphics_state.rb#48 def color_space=(_arg0); end # Returns the value of attribute dash. # # source://pdf-core//lib/pdf/core/graphics_state.rb#48 def dash; end # Sets the attribute dash # # @param value the value to set the attribute dash to. # # source://pdf-core//lib/pdf/core/graphics_state.rb#48 def dash=(_arg0); end # source://pdf-core//lib/pdf/core/graphics_state.rb#65 def dash_setting; end # Returns the value of attribute fill_color. # # source://pdf-core//lib/pdf/core/graphics_state.rb#48 def fill_color; end # Sets the attribute fill_color # # @param value the value to set the attribute fill_color to. # # source://pdf-core//lib/pdf/core/graphics_state.rb#48 def fill_color=(_arg0); end # Returns the value of attribute join_style. # # source://pdf-core//lib/pdf/core/graphics_state.rb#48 def join_style; end # Sets the attribute join_style # # @param value the value to set the attribute join_style to. # # source://pdf-core//lib/pdf/core/graphics_state.rb#48 def join_style=(_arg0); end # Returns the value of attribute line_width. # # source://pdf-core//lib/pdf/core/graphics_state.rb#48 def line_width; end # Sets the attribute line_width # # @param value the value to set the attribute line_width to. # # source://pdf-core//lib/pdf/core/graphics_state.rb#48 def line_width=(_arg0); end # Returns the value of attribute stroke_color. # # source://pdf-core//lib/pdf/core/graphics_state.rb#48 def stroke_color; end # Sets the attribute stroke_color # # @param value the value to set the attribute stroke_color to. # # source://pdf-core//lib/pdf/core/graphics_state.rb#48 def stroke_color=(_arg0); end private # source://pdf-core//lib/pdf/core/graphics_state.rb#75 def initialize_copy(other); end end # source://pdf-core//lib/pdf/core/graphics_state.rb#13 class PDF::Core::GraphicStateStack # @return [GraphicStateStack] a new instance of GraphicStateStack # # source://pdf-core//lib/pdf/core/graphics_state.rb#16 def initialize(previous_state = T.unsafe(nil)); end # source://pdf-core//lib/pdf/core/graphics_state.rb#32 def current_state; end # @return [Boolean] # # source://pdf-core//lib/pdf/core/graphics_state.rb#40 def empty?; end # @return [Boolean] # # source://pdf-core//lib/pdf/core/graphics_state.rb#36 def present?; end # source://pdf-core//lib/pdf/core/graphics_state.rb#24 def restore_graphic_state; end # source://pdf-core//lib/pdf/core/graphics_state.rb#20 def save_graphic_state(graphic_state = T.unsafe(nil)); end # Returns the value of attribute stack. # # source://pdf-core//lib/pdf/core/graphics_state.rb#14 def stack; end # Sets the attribute stack # # @param value the value to set the attribute stack to. # # source://pdf-core//lib/pdf/core/graphics_state.rb#14 def stack=(_arg0); end end # This is used to differentiate strings that must be encoded as # a *literal* string, versus those that can be encoded in # the PDF hexadecimal format. # # Some features of the PDF format appear to require that literal # strings be used. One such feature is the /Dest key of a link # annotation; if a hex encoded string is used there, the links # do not work (as tested in Mac OS X Preview, and Adobe Acrobat # Reader). # # source://pdf-core//lib/pdf/core/literal_string.rb#13 class PDF::Core::LiteralString < ::String; end # source://pdf-core//lib/pdf/core/name_tree.rb#11 module PDF::Core::NameTree; end # source://pdf-core//lib/pdf/core/name_tree.rb#12 class PDF::Core::NameTree::Node # @return [Node] a new instance of Node # # source://pdf-core//lib/pdf/core/name_tree.rb#19 def initialize(document, limit, parent = T.unsafe(nil)); end # source://pdf-core//lib/pdf/core/name_tree.rb#72 def <<(value); end # source://pdf-core//lib/pdf/core/name_tree.rb#87 def >=(value); end # source://pdf-core//lib/pdf/core/name_tree.rb#39 def add(name, value); end # Returns the value of attribute children. # # source://pdf-core//lib/pdf/core/name_tree.rb#13 def children; end # Returns a deep copy of this node, without copying expensive things # like the ref to @document. # # source://pdf-core//lib/pdf/core/name_tree.rb#104 def deep_copy; end # Returns the value of attribute document. # # source://pdf-core//lib/pdf/core/name_tree.rb#15 def document; end # @return [Boolean] # # source://pdf-core//lib/pdf/core/name_tree.rb#27 def empty?; end # source://pdf-core//lib/pdf/core/name_tree.rb#64 def greatest; end # @return [Boolean] # # source://pdf-core//lib/pdf/core/name_tree.rb#35 def leaf?; end # source://pdf-core//lib/pdf/core/name_tree.rb#56 def least; end # Returns the value of attribute limit. # # source://pdf-core//lib/pdf/core/name_tree.rb#14 def limit; end # Returns the value of attribute parent. # # source://pdf-core//lib/pdf/core/name_tree.rb#16 def parent; end # Sets the attribute parent # # @param value the value to set the attribute parent to. # # source://pdf-core//lib/pdf/core/name_tree.rb#16 def parent=(_arg0); end # Returns the value of attribute ref. # # source://pdf-core//lib/pdf/core/name_tree.rb#17 def ref; end # Sets the attribute ref # # @param value the value to set the attribute ref to. # # source://pdf-core//lib/pdf/core/name_tree.rb#17 def ref=(_arg0); end # source://pdf-core//lib/pdf/core/name_tree.rb#31 def size; end # source://pdf-core//lib/pdf/core/name_tree.rb#91 def split!; end # source://pdf-core//lib/pdf/core/name_tree.rb#43 def to_hash; end protected # source://pdf-core//lib/pdf/core/name_tree.rb#115 def split(node); end private # source://pdf-core//lib/pdf/core/name_tree.rb#145 def insertion_point(value); end # source://pdf-core//lib/pdf/core/name_tree.rb#125 def new_node(parent = T.unsafe(nil)); end # source://pdf-core//lib/pdf/core/name_tree.rb#131 def split_children(node, left, right); end end # source://pdf-core//lib/pdf/core/name_tree.rb#153 class PDF::Core::NameTree::Value include ::Comparable # @return [Value] a new instance of Value # # source://pdf-core//lib/pdf/core/name_tree.rb#159 def initialize(name, value); end # source://pdf-core//lib/pdf/core/name_tree.rb#163 def <=>(leaf); end # source://pdf-core//lib/pdf/core/name_tree.rb#167 def inspect; end # Returns the value of attribute name. # # source://pdf-core//lib/pdf/core/name_tree.rb#156 def name; end # source://pdf-core//lib/pdf/core/name_tree.rb#171 def to_s; end # Returns the value of attribute value. # # source://pdf-core//lib/pdf/core/name_tree.rb#157 def value; end end # source://pdf-core//lib/pdf/core/object_store.rb#11 class PDF::Core::ObjectStore include ::Enumerable # @return [ObjectStore] a new instance of ObjectStore # # source://pdf-core//lib/pdf/core/object_store.rb#16 def initialize(opts = T.unsafe(nil)); end # Adds the given reference to the store and returns the reference object. # If the object provided is not a PDF::Core::Reference, one is created from the # arguments provided. # # source://pdf-core//lib/pdf/core/object_store.rb#54 def <<(*args, &block); end # source://pdf-core//lib/pdf/core/object_store.rb#74 def [](id); end # source://pdf-core//lib/pdf/core/object_store.rb#68 def each; end # source://pdf-core//lib/pdf/core/object_store.rb#34 def info; end # @return [Boolean] # # source://pdf-core//lib/pdf/core/object_store.rb#99 def is_utf8?(str); end # source://pdf-core//lib/pdf/core/object_store.rb#78 def length; end # Returns the value of attribute min_version. # # source://pdf-core//lib/pdf/core/object_store.rb#14 def min_version; end # returns the object ID for a particular page in the document. Pages # are indexed starting at 1 (not 0!). # # object_id_for_page(1) # => 5 # object_id_for_page(10) # => 87 # object_id_for_page(-11) # => 17 # # source://pdf-core//lib/pdf/core/object_store.rb#93 def object_id_for_page(k); end # source://pdf-core//lib/pdf/core/object_store.rb#46 def page_count; end # source://pdf-core//lib/pdf/core/object_store.rb#42 def pages; end # Adds the given reference to the store and returns the reference object. # If the object provided is not a PDF::Core::Reference, one is created from the # arguments provided. # # source://pdf-core//lib/pdf/core/object_store.rb#54 def push(*args, &block); end # source://pdf-core//lib/pdf/core/object_store.rb#30 def ref(data, &block); end # source://pdf-core//lib/pdf/core/object_store.rb#38 def root; end # source://pdf-core//lib/pdf/core/object_store.rb#78 def size; end end # source://pdf-core//lib/pdf/core/outline_item.rb#3 class PDF::Core::OutlineItem # @return [OutlineItem] a new instance of OutlineItem # # source://pdf-core//lib/pdf/core/outline_item.rb#6 def initialize(title, parent, options); end # Returns the value of attribute closed. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def closed; end # Sets the attribute closed # # @param value the value to set the attribute closed to. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def closed=(_arg0); end # Returns the value of attribute count. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def count; end # Sets the attribute count # # @param value the value to set the attribute count to. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def count=(_arg0); end # Returns the value of attribute dest. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def dest; end # Sets the attribute dest # # @param value the value to set the attribute dest to. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def dest=(_arg0); end # Returns the value of attribute first. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def first; end # Sets the attribute first # # @param value the value to set the attribute first to. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def first=(_arg0); end # Returns the value of attribute last. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def last; end # Sets the attribute last # # @param value the value to set the attribute last to. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def last=(_arg0); end # Returns the value of attribute next. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def next; end # Sets the attribute next # # @param value the value to set the attribute next to. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def next=(_arg0); end # Returns the value of attribute parent. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def parent; end # Sets the attribute parent # # @param value the value to set the attribute parent to. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def parent=(_arg0); end # Returns the value of attribute prev. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def prev; end # Sets the attribute prev # # @param value the value to set the attribute prev to. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def prev=(_arg0); end # Returns the value of attribute title. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def title; end # Sets the attribute title # # @param value the value to set the attribute title to. # # source://pdf-core//lib/pdf/core/outline_item.rb#4 def title=(_arg0); end # source://pdf-core//lib/pdf/core/outline_item.rb#13 def to_hash; end end # source://pdf-core//lib/pdf/core/outline_root.rb#3 class PDF::Core::OutlineRoot # @return [OutlineRoot] a new instance of OutlineRoot # # source://pdf-core//lib/pdf/core/outline_root.rb#6 def initialize; end # Returns the value of attribute count. # # source://pdf-core//lib/pdf/core/outline_root.rb#4 def count; end # Sets the attribute count # # @param value the value to set the attribute count to. # # source://pdf-core//lib/pdf/core/outline_root.rb#4 def count=(_arg0); end # Returns the value of attribute first. # # source://pdf-core//lib/pdf/core/outline_root.rb#4 def first; end # Sets the attribute first # # @param value the value to set the attribute first to. # # source://pdf-core//lib/pdf/core/outline_root.rb#4 def first=(_arg0); end # Returns the value of attribute last. # # source://pdf-core//lib/pdf/core/outline_root.rb#4 def last; end # Sets the attribute last # # @param value the value to set the attribute last to. # # source://pdf-core//lib/pdf/core/outline_root.rb#4 def last=(_arg0); end # source://pdf-core//lib/pdf/core/outline_root.rb#10 def to_hash; end end # source://pdf-core//lib/pdf/core/page.rb#14 class PDF::Core::Page # @return [Page] a new instance of Page # # source://pdf-core//lib/pdf/core/page.rb#18 def initialize(document, options = T.unsafe(nil)); end # source://pdf-core//lib/pdf/core/page.rb#74 def content; end # Sets the attribute content # # @param value the value to set the attribute content to. # # source://pdf-core//lib/pdf/core/page.rb#16 def content=(_arg0); end # source://pdf-core//lib/pdf/core/page.rb#78 def dictionary; end # Sets the attribute dictionary # # @param value the value to set the attribute dictionary to. # # source://pdf-core//lib/pdf/core/page.rb#16 def dictionary=(_arg0); end # source://pdf-core//lib/pdf/core/page.rb#128 def dimensions; end # Returns the value of attribute document. # # source://pdf-core//lib/pdf/core/page.rb#15 def document; end # Sets the attribute document # # @param value the value to set the attribute document to. # # source://pdf-core//lib/pdf/core/page.rb#15 def document=(_arg0); end # source://pdf-core//lib/pdf/core/page.rb#106 def ext_gstates; end # source://pdf-core//lib/pdf/core/page.rb#114 def finalize; end # source://pdf-core//lib/pdf/core/page.rb#90 def fonts; end # source://pdf-core//lib/pdf/core/page.rb#32 def graphic_state; end # @return [Boolean] # # source://pdf-core//lib/pdf/core/page.rb#124 def imported_page?; end # @return [Boolean] # # source://pdf-core//lib/pdf/core/page.rb#51 def in_stamp_stream?; end # source://pdf-core//lib/pdf/core/page.rb#36 def layout; end # Returns the value of attribute margins. # # source://pdf-core//lib/pdf/core/page.rb#15 def margins; end # Sets the attribute margins # # @param value the value to set the attribute margins to. # # source://pdf-core//lib/pdf/core/page.rb#15 def margins=(_arg0); end # source://pdf-core//lib/pdf/core/page.rb#82 def resources; end # source://pdf-core//lib/pdf/core/page.rb#47 def size; end # Returns the value of attribute stack. # # source://pdf-core//lib/pdf/core/page.rb#15 def stack; end # Sets the attribute stack # # @param value the value to set the attribute stack to. # # source://pdf-core//lib/pdf/core/page.rb#15 def stack=(_arg0); end # source://pdf-core//lib/pdf/core/page.rb#55 def stamp_stream(dictionary); end # source://pdf-core//lib/pdf/core/page.rb#98 def xobjects; end private # some entries in the Page dict can be inherited from parent Pages dicts. # # Starting with the current page dict, this method will walk up the # inheritance chain return the first value that is found for key # # inherited_dictionary_value(:MediaBox) # => [ 0, 0, 595, 842 ] # # source://pdf-core//lib/pdf/core/page.rb#183 def inherited_dictionary_value(key, local_dict = T.unsafe(nil)); end # source://pdf-core//lib/pdf/core/page.rb#145 def init_from_object(options); end # source://pdf-core//lib/pdf/core/page.rb#157 def init_new_page(options); end end # Dimensions pulled from PDF::Writer, rubyforge.org/projects/ruby-pdf # # All of these dimensions are in PDF Points (1/72 inch) # # ===Inbuilt Sizes: # # # 4A0:: => 4767.87 x 6740.79 # 2A0:: => 3370.39 x 4767.87 # A0:: => 2383.94 x 3370.39 # A1:: => 1683.78 x 2383.94 # A2:: => 1190.55 x 1683.78 # A3:: => 841.89 x 1190.55 # A4:: => 595.28 x 841.89 # A5:: => 419.53 x 595.28 # A6:: => 297.64 x 419.53 # A7:: => 209.76 x 297.64 # A8:: => 147.40 x 209.76 # A9:: => 104.88 x 147.40 # A10:: => 73.70 x 104.88 # B0:: => 2834.65 x 4008.19 # B1:: => 2004.09 x 2834.65 # B2:: => 1417.32 x 2004.09 # B3:: => 1000.63 x 1417.32 # B4:: => 708.66 x 1000.63 # B5:: => 498.90 x 708.66 # B6:: => 354.33 x 498.90 # B7:: => 249.45 x 354.33 # B8:: => 175.75 x 249.45 # B9:: => 124.72 x 175.75 # B10:: => 87.87 x 124.72 # C0:: => 2599.37 x 3676.54 # C1:: => 1836.85 x 2599.37 # C2:: => 1298.27 x 1836.85 # C3:: => 918.43 x 1298.27 # C4:: => 649.13 x 918.43 # C5:: => 459.21 x 649.13 # C6:: => 323.15 x 459.21 # C7:: => 229.61 x 323.15 # C8:: => 161.57 x 229.61 # C9:: => 113.39 x 161.57 # C10:: => 79.37 x 113.39 # RA0:: => 2437.80 x 3458.27 # RA1:: => 1729.13 x 2437.80 # RA2:: => 1218.90 x 1729.13 # RA3:: => 864.57 x 1218.90 # RA4:: => 609.45 x 864.57 # SRA0:: => 2551.18 x 3628.35 # SRA1:: => 1814.17 x 2551.18 # SRA2:: => 1275.59 x 1814.17 # SRA3:: => 907.09 x 1275.59 # SRA4:: => 637.80 x 907.09 # EXECUTIVE:: => 521.86 x 756.00 # FOLIO:: => 612.00 x 936.00 # LEGAL:: => 612.00 x 1008.00 # LETTER:: => 612.00 x 792.00 # TABLOID:: => 792.00 x 1224.00 # # source://pdf-core//lib/pdf/core/page_geometry.rb#70 module PDF::Core::PageGeometry; end # source://pdf-core//lib/pdf/core/page_geometry.rb#72 PDF::Core::PageGeometry::SIZES = T.let(T.unsafe(nil), Hash) # source://pdf-core//lib/pdf/core/reference.rb#12 class PDF::Core::Reference # @return [Reference] a new instance of Reference # # source://pdf-core//lib/pdf/core/reference.rb#16 def initialize(id, data); end # source://pdf-core//lib/pdf/core/reference.rb#34 def <<(io); end # Returns the value of attribute data. # # source://pdf-core//lib/pdf/core/reference.rb#14 def data; end # Sets the attribute data # # @param value the value to set the attribute data to. # # source://pdf-core//lib/pdf/core/reference.rb#14 def data=(_arg0); end # Creates a deep copy of this ref. If +share+ is provided, shares the # given dictionary entries between the old ref and the new. # # source://pdf-core//lib/pdf/core/reference.rb#46 def deep_copy(share = T.unsafe(nil)); end # source://prawn/1.3.0/lib/prawn/security.rb#272 def encrypted_object(key); end # Returns the value of attribute gen. # # source://pdf-core//lib/pdf/core/reference.rb#14 def gen; end # Sets the attribute gen # # @param value the value to set the attribute gen to. # # source://pdf-core//lib/pdf/core/reference.rb#14 def gen=(_arg0); end # Returns the value of attribute identifier. # # source://pdf-core//lib/pdf/core/reference.rb#14 def identifier; end # Sets the attribute identifier # # @param value the value to set the attribute identifier to. # # source://pdf-core//lib/pdf/core/reference.rb#14 def identifier=(_arg0); end # source://pdf-core//lib/pdf/core/reference.rb#23 def object; end # Returns the value of attribute offset. # # source://pdf-core//lib/pdf/core/reference.rb#14 def offset; end # Sets the attribute offset # # @param value the value to set the attribute offset to. # # source://pdf-core//lib/pdf/core/reference.rb#14 def offset=(_arg0); end # Replaces the data and stream with that of other_ref. # # source://pdf-core//lib/pdf/core/reference.rb#66 def replace(other_ref); end # Returns the value of attribute stream. # # source://pdf-core//lib/pdf/core/reference.rb#14 def stream; end # Sets the attribute stream # # @param value the value to set the attribute stream to. # # source://pdf-core//lib/pdf/core/reference.rb#14 def stream=(_arg0); end # source://pdf-core//lib/pdf/core/reference.rb#39 def to_s; end end # source://pdf-core//lib/pdf/core/renderer.rb#5 class PDF::Core::Renderer # @return [Renderer] a new instance of Renderer # # source://pdf-core//lib/pdf/core/renderer.rb#6 def initialize(state); end # Appends a raw string to the current page content. # # # Raw line drawing example: # x1,y1,x2,y2 = 100,500,300,550 # pdf.add_content("%.3f %.3f m" % [ x1, y1 ]) # move # pdf.add_content("%.3f %.3f l" % [ x2, y2 ]) # draw path # pdf.add_content("S") # stroke # # source://pdf-core//lib/pdf/core/renderer.rb#54 def add_content(str); end # Defines a block to be called just before the document is rendered. # # source://pdf-core//lib/pdf/core/renderer.rb#75 def before_render(&block); end # source://pdf-core//lib/pdf/core/renderer.rb#227 def close_graphics_state; end # Returns true if content streams will be compressed before rendering, # false otherwise # # @return [Boolean] # # source://pdf-core//lib/pdf/core/renderer.rb#243 def compression_enabled?; end # At any stage in the object tree an object can be replaced with an # indirect reference. To get access to the object safely, regardless # of if it's hidden behind a Prawn::Reference, wrap it in deref(). # # source://pdf-core//lib/pdf/core/renderer.rb#42 def deref(obj); end # source://pdf-core//lib/pdf/core/renderer.rb#129 def finalize_all_page_contents; end # Re-opens the page with the given (1-based) page number so that you can # draw on it. # # See Prawn::Document#number_pages for a sample usage of this capability. # # source://pdf-core//lib/pdf/core/renderer.rb#124 def go_to_page(k); end # source://pdf-core//lib/pdf/core/renderer.rb#258 def graphic_stack; end # source://pdf-core//lib/pdf/core/renderer.rb#262 def graphic_state; end # raise the PDF version of the file we're going to generate. # A private method, designed for internal use when the user adds a feature # to their document that requires a particular version. # # source://pdf-core//lib/pdf/core/renderer.rb#143 def min_version(min); end # The Name dictionary (PDF spec 3.6.3) for this document. It is # lazily initialized, so that documents that do not need a name # dictionary do not incur the additional overhead. # # source://pdf-core//lib/pdf/core/renderer.rb#63 def names; end # Returns true if the Names dictionary is in use for this document. # # @return [Boolean] # # source://pdf-core//lib/pdf/core/renderer.rb#69 def names?; end # Defines a block to be called just before a new page is started. # # source://pdf-core//lib/pdf/core/renderer.rb#81 def on_page_create(&block); end # source://pdf-core//lib/pdf/core/renderer.rb#223 def open_graphics_state; end # source://pdf-core//lib/pdf/core/renderer.rb#115 def page_count; end # Creates a new Reference and adds it to the Document's object # list. The +data+ argument is anything that Prawn::PdfObject() can convert. # # Returns the identifier which points to the reference in the ObjectStore # # source://pdf-core//lib/pdf/core/renderer.rb#22 def ref(data); end # Like ref, but returns the actual reference instead of its identifier. # # While you can use this to build up nested references within the object # tree, it is recommended to persist only identifiers, and then provide # helper methods to look up the actual references in the ObjectStore # if needed. If you take this approach, Document::Snapshot # will probably work with your extension # # source://pdf-core//lib/pdf/core/renderer.rb#34 def ref!(data); end # Renders the PDF document to string. # Pass an open file descriptor to render to file. # # source://pdf-core//lib/pdf/core/renderer.rb#150 def render(output = T.unsafe(nil)); end # Write out the PDF Body, as per spec 3.4.2 # # source://pdf-core//lib/pdf/core/renderer.rb#191 def render_body(output); end # Renders the PDF document to file. # # pdf.render_file "foo.pdf" # # source://pdf-core//lib/pdf/core/renderer.rb#173 def render_file(filename); end # Write out the PDF Header, as per spec 3.4.1 # # source://pdf-core//lib/pdf/core/renderer.rb#179 def render_header(output); end # Write out the PDF Trailer, as per spec 3.4.4 # # source://pdf-core//lib/pdf/core/renderer.rb#210 def render_trailer(output); end # Write out the PDF Cross Reference Table, as per spec 3.4.3 # # source://pdf-core//lib/pdf/core/renderer.rb#197 def render_xref(output); end # Pops the last saved graphics state off the graphics state stack and # restores the state to those values # # source://pdf-core//lib/pdf/core/renderer.rb#249 def restore_graphics_state; end # source://pdf-core//lib/pdf/core/renderer.rb#231 def save_graphics_state(graphic_state = T.unsafe(nil)); end # source://pdf-core//lib/pdf/core/renderer.rb#89 def start_new_page(options = T.unsafe(nil)); end # Returns the value of attribute state. # # source://pdf-core//lib/pdf/core/renderer.rb#15 def state; end end # source://pdf-core//lib/pdf/core/stream.rb#11 class PDF::Core::Stream # @return [Stream] a new instance of Stream # # source://pdf-core//lib/pdf/core/stream.rb#14 def initialize(io = T.unsafe(nil)); end # source://pdf-core//lib/pdf/core/stream.rb#20 def <<(io); end # source://pdf-core//lib/pdf/core/stream.rb#26 def compress!; end # @return [Boolean] # # source://pdf-core//lib/pdf/core/stream.rb#33 def compressed?; end # source://pdf-core//lib/pdf/core/stream.rb#72 def data; end # @return [Boolean] # # source://pdf-core//lib/pdf/core/stream.rb#37 def empty?; end # source://prawn/1.3.0/lib/prawn/security.rb#258 def encrypted_object(key, id, gen); end # source://pdf-core//lib/pdf/core/stream.rb#41 def filtered_stream; end # Returns the value of attribute filters. # # source://pdf-core//lib/pdf/core/stream.rb#12 def filters; end # source://pdf-core//lib/pdf/core/stream.rb#93 def inspect; end # source://pdf-core//lib/pdf/core/stream.rb#60 def length; end # source://pdf-core//lib/pdf/core/stream.rb#64 def object; end end # source://pdf-core//lib/pdf/core/text.rb#11 module PDF::Core::Text # source://pdf-core//lib/pdf/core/text.rb#232 def add_text_content(text, x, y, options); end # Increases or decreases the space between characters. # For horizontal text, a positive value will increase the space. # For veritical text, a positive value will decrease the space. # # source://pdf-core//lib/pdf/core/text.rb#200 def character_spacing(amount = T.unsafe(nil)); end # Call with a boolean to set the document-wide kerning setting. This can be # overridden using the :kerning text option when drawing text or a text # box. # # pdf.default_kerning = false # pdf.text("hello world") # text is not kerned # pdf.text("hello world", :kerning => true) # text is kerned # # source://pdf-core//lib/pdf/core/text.rb#55 def default_kerning(boolean); end # Call with a boolean to set the document-wide kerning setting. This can be # overridden using the :kerning text option when drawing text or a text # box. # # pdf.default_kerning = false # pdf.text("hello world") # text is not kerned # pdf.text("hello world", :kerning => true) # text is kerned # # source://pdf-core//lib/pdf/core/text.rb#55 def default_kerning=(boolean); end # Retrieve the current default kerning setting. # # Defaults to true # # @return [Boolean] # # source://pdf-core//lib/pdf/core/text.rb#42 def default_kerning?; end # Call with no argument to retrieve the current default leading. # # Call with a number to set the document-wide text leading. This can be # overridden using the :leading text option when drawing text or a text # box. # # pdf.default_leading = 7 # pdf.text("hello world") # a leading of 7 is used # pdf.text("hello world", :leading => 0) # a leading of 0 is used # # Defaults to 0 # # source://pdf-core//lib/pdf/core/text.rb#73 def default_leading(number = T.unsafe(nil)); end # Call with no argument to retrieve the current default leading. # # Call with a number to set the document-wide text leading. This can be # overridden using the :leading text option when drawing text or a text # box. # # pdf.default_leading = 7 # pdf.text("hello world") # a leading of 7 is used # pdf.text("hello world", :leading => 0) # a leading of 0 is used # # Defaults to 0 # # source://pdf-core//lib/pdf/core/text.rb#73 def default_leading=(number = T.unsafe(nil)); end # Call with no argument to retrieve the current fallback fonts. # # Call with an array of font names. Each name must be the name of an AFM # font or the name that was used to register a family of TTF fonts (see # Prawn::Document#font_families). If present, then each glyph will be # rendered using the first font that includes the glyph, starting with the # current font and then moving through :fallback_fonts from left to right. # # Call with an empty array to turn off fallback fonts # # file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf" # font_families["Kai"] = { # :normal => { :file => file, :font => "Kai" } # } # file = "#{Prawn::DATADIR}/fonts/Action Man.dfont" # font_families["Action Man"] = { # :normal => { :file => file, :font => "ActionMan" }, # } # fallback_fonts ["Times-Roman", "Kai"] # font "Action Man" # text "hello ƒ 你好" # > hello prints in Action Man # > ƒ prints in Times-Roman # > 你好 prints in Kai # # fallback_fonts [] # clears document-wide fallback fonts # # Side effects: # # * Increased overhead when fallback fonts are declared as each glyph is # checked to see whether it exists in the current font # # source://pdf-core//lib/pdf/core/text.rb#145 def fallback_fonts(fallback_fonts = T.unsafe(nil)); end # Call with no argument to retrieve the current fallback fonts. # # Call with an array of font names. Each name must be the name of an AFM # font or the name that was used to register a family of TTF fonts (see # Prawn::Document#font_families). If present, then each glyph will be # rendered using the first font that includes the glyph, starting with the # current font and then moving through :fallback_fonts from left to right. # # Call with an empty array to turn off fallback fonts # # file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf" # font_families["Kai"] = { # :normal => { :file => file, :font => "Kai" } # } # file = "#{Prawn::DATADIR}/fonts/Action Man.dfont" # font_families["Action Man"] = { # :normal => { :file => file, :font => "ActionMan" }, # } # fallback_fonts ["Times-Roman", "Kai"] # font "Action Man" # text "hello ƒ 你好" # > hello prints in Action Man # > ƒ prints in Times-Roman # > 你好 prints in Kai # # fallback_fonts [] # clears document-wide fallback fonts # # Side effects: # # * Increased overhead when fallback fonts are declared as each glyph is # checked to see whether it exists in the current font # # source://pdf-core//lib/pdf/core/text.rb#145 def fallback_fonts=(fallback_fonts = T.unsafe(nil)); end # source://pdf-core//lib/pdf/core/text.rb#192 def forget_text_rendering_mode!; end # Low level call to set the current font style and extract text options from # an options hash. Should be called from within a save_font block # # source://pdf-core//lib/pdf/core/text.rb#24 def process_text_options(options); end # Returns the value of attribute skip_encoding. # # source://pdf-core//lib/pdf/core/text.rb#19 def skip_encoding; end # Call with no argument to retrieve the current text direction. # # Call with a symbol to set the document-wide text direction. This can be # overridden using the :direction text option when drawing text or a text # box. # # pdf.text_direction = :rtl # pdf.text("hello world") # prints "dlrow olleh" # pdf.text("hello world", :direction => :ltr) # prints "hello world" # # Valid directions are: # # * :ltr - left-to-right (default) # * :rtl - right-to-left # # Side effects: # # * When printing left-to-right, the default text alignment is :left # * When printing right-to-left, the default text alignment is :right # # source://pdf-core//lib/pdf/core/text.rb#103 def text_direction(direction = T.unsafe(nil)); end # Call with no argument to retrieve the current text direction. # # Call with a symbol to set the document-wide text direction. This can be # overridden using the :direction text option when drawing text or a text # box. # # pdf.text_direction = :rtl # pdf.text("hello world") # prints "dlrow olleh" # pdf.text("hello world", :direction => :ltr) # prints "hello world" # # Valid directions are: # # * :ltr - left-to-right (default) # * :rtl - right-to-left # # Side effects: # # * When printing left-to-right, the default text alignment is :left # * When printing right-to-left, the default text alignment is :right # # source://pdf-core//lib/pdf/core/text.rb#103 def text_direction=(direction = T.unsafe(nil)); end # Call with no argument to retrieve the current text rendering mode. # # Call with a symbol and block to temporarily change the current # text rendering mode. # # pdf.text_rendering_mode(:stroke) do # pdf.text("Outlined Text") # end # # Valid modes are: # # * :fill - fill text (default) # * :stroke - stroke text # * :fill_stroke - fill, then stroke text # * :invisible - invisible text # * :fill_clip - fill text then add to path for clipping # * :stroke_clip - stroke text then add to path for clipping # * :fill_stroke_clip - fill then stroke text, then add to path for clipping # * :clip - add text to path for clipping # # source://pdf-core//lib/pdf/core/text.rb#174 def text_rendering_mode(mode = T.unsafe(nil)); end # Increases or decreases the space between words. # For horizontal text, a positive value will increase the space. # For veritical text, a positive value will decrease the space. # # source://pdf-core//lib/pdf/core/text.rb#218 def word_spacing(amount = T.unsafe(nil)); end end # source://pdf-core//lib/pdf/core/text.rb#15 PDF::Core::Text::MODES = T.let(T.unsafe(nil), Hash) # These should be used as a base. Extensions may build on this list # # source://pdf-core//lib/pdf/core/text.rb#14 PDF::Core::Text::VALID_OPTIONS = T.let(T.unsafe(nil), Array)