Class: DocumentExporter::PDF::Document

Inherits:
Base
  • Object
show all
Defined in:
lib/document_exporter/pdf/document.rb

Instance Method Summary collapse

Methods inherited from Base

#pdf_content, s3_folder

Methods inherited from Base

#included_materials, #initialize, #ordered_materials, pdf_key

Constructor Details

This class inherits a constructor from DocumentExporter::Base

Instance Method Details

#exportObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/document_exporter/pdf/document.rb', line 6

def export
  content = super
  pdf = CombinePDF.parse(content)

  material_ids = @document.ordered_material_ids
  material_ids &= @document.gdoc_material_ids
  material_ids &= included_materials

  pdf = combine_pdf_for pdf, material_ids
  pdf.to_pdf
end