Module: Gotenberg::Libreoffice::Properties

Included in:
Gotenberg::Libreoffice
Defined in:
lib/gotenberg/libreoffice/properties.rb

Instance Method Summary collapse

Instance Method Details

#landscapeObject

Sets the paper orientation to landscape.



6
7
8
9
10
# File 'lib/gotenberg/libreoffice/properties.rb', line 6

def landscape
  properties['landscape'] = true

  self
end

#mergeObject

Merges the resulting PDFs.



36
37
38
39
40
# File 'lib/gotenberg/libreoffice/properties.rb', line 36

def merge
  properties['merge'] = true

  self
end

#native_page_ranges(ranges) ⇒ Object

Set the page ranges to print, e.g., “1-5, 8, 11-13”. Empty means all pages. Note: the page ranges are applied to all files independently.



14
15
16
17
18
# File 'lib/gotenberg/libreoffice/properties.rb', line 14

def native_page_ranges ranges
  properties['nativePageRanges'] = ranges

  self
end

#native_pdf_format(format) ⇒ Object

Tells Gotenberg to use unoconv for converting the resulting PDF to a PDF format.



21
22
23
24
25
# File 'lib/gotenberg/libreoffice/properties.rb', line 21

def native_pdf_format format
  properties['nativePdfFormat'] = format

  self
end

#pdf_format(format) ⇒ Object

Sets the PDF format of the resulting PDF. See gotenberg.dev/docs/modules/pdf-engines#engines.



29
30
31
32
33
# File 'lib/gotenberg/libreoffice/properties.rb', line 29

def pdf_format format
  properties['pdfFormat'] = format

  self
end