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
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.
10 11 12 13 |
# File 'lib/acrofill/flattener.rb', line 10 def initialize(doc) @doc = doc @stamp_counter = 0 end |
Instance Method Details
#flatten! ⇒ Object
15 16 17 18 |
# File 'lib/acrofill/flattener.rb', line 15 def flatten! @doc.each_page { |page| flatten_page(page) } @doc.root.delete(:AcroForm) end |