File: basic_concepts.rb

package info (click to toggle)
ruby-prawn 2.5.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,528 kB
  • sloc: ruby: 17,688; sh: 43; makefile: 20
file content (31 lines) | stat: -rw-r--r-- 996 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# frozen_string_literal: true

require 'prawn/manual_builder'

Prawn::ManualBuilder::Peritext.new do
  text do
    header_with_bg('Basic Concepts')

    prose <<~TEXT
      This chapter covers the minimum amount of functionality you'll need to
      start using Prawn.

      If you are new to Prawn this is the first chapter to read. Once you are
      comfortable with the concepts shown here you might want to check the
      Basics section of the Graphics, Bounding Box and Text sections.

      The examples show:
    TEXT

    list(
      'How to create new pdf documents in every possible way',
      'Where the origin for the document coordinates is. What are Bounding ' \
        'Boxes and how they interact with the origin',
      'How the cursor behaves',
      'How to start new pages',
      'What the base unit for measurement and coordinates is and how to use ' \
        'other convenient measures',
      "How to build custom view objects that use Prawn's DSL",
    )
  end
end