Sha256: 7c704e7f876e1b0a6330bf591fb5f3b08f90cd6e71a830353df13bb15033d4ac

Contents?: true

Size: 758 Bytes

Versions: 5

Compression:

Stored size: 758 Bytes

Contents

# encoding: utf-8
#
# To set the document metadata just pass a hash to the <code>:info</code>
# option when creating new documents.
#
require File.expand_path(File.join(File.dirname(__FILE__),
                                   %w[.. example_helper]))

Prawn::Document.generate("metadata.pdf",
  :info => {
    :Title        => "My title",
    :Author       => "John Doe",
    :Subject      => "My Subject",
    :Keywords     => "test metadata ruby pdf dry",
    :Creator      => "ACME Soft App", 
    :Producer     => "Prawn",
    :CreationDate => Time.now,
    :Grok         => "Test Property"
  }) do
  
  text "This is a test of setting metadata properties via the info option."
  text "It allows one to specify non standard properties like 'Grok'."
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
prawn-0.13.2 manual/document_and_page_options/metadata.rb
prawn-0.13.1 manual/document_and_page_options/metadata.rb
prawn-0.13.0 manual/document_and_page_options/metadata.rb
prawn-1.0.0.rc2 manual/document_and_page_options/metadata.rb
nurettin-prawn-1.0.0.rc1 manual/document_and_page_options/metadata.rb