Class: Acrofill::Flattener
- Inherits:
-
Object
- Object
- Acrofill::Flattener
- Defined in:
- lib/acrofill/flattener.rb
Overview
Burns widget appearances into page content and removes the interactive
layer, like pdftk's output ... flatten. Every geometry value it reads
comes from the template, so each one is validated before use.
Constant Summary collapse
- HIDDEN_FLAG =
2- NOVIEW_FLAG =
32- INVISIBLE =
HIDDEN_FLAG | NOVIEW_FLAG
Instance Method Summary collapse
- #flatten! ⇒ Object
-
#initialize(doc) ⇒ Flattener
constructor
A new instance of Flattener.
Constructor Details
#initialize(doc) ⇒ Flattener
Returns a new instance of Flattener.
12 13 14 15 |
# File 'lib/acrofill/flattener.rb', line 12 def initialize(doc) @doc = doc @stamp_counter = 0 end |
Instance Method Details
#flatten! ⇒ Object
17 18 19 20 |
# File 'lib/acrofill/flattener.rb', line 17 def flatten! @doc.each_page { |page| flatten_page(page) } @doc.root.delete(:AcroForm) end |