Class: Typst::Pdf
Instance Attribute Summary collapse
-
#bytes ⇒ Object
Returns the value of attribute bytes.
Attributes inherited from Base
#font_paths, #input, #root, #sys_inputs
Instance Method Summary collapse
- #document ⇒ Object
-
#initialize(input, root: ".", font_paths: [], sys_inputs: {}) ⇒ Pdf
constructor
A new instance of Pdf.
Methods inherited from Base
Constructor Details
#initialize(input, root: ".", font_paths: [], sys_inputs: {}) ⇒ Pdf
Returns a new instance of Pdf.
81 82 83 84 |
# File 'lib/typst.rb', line 81 def initialize(input, root: ".", font_paths: [], sys_inputs: {}) super(input, root: root, font_paths: font_paths, sys_inputs: sys_inputs) @bytes = Typst::_to_pdf(self.input, self.root, self.font_paths, File.dirname(__FILE__), false, sys_inputs)[0] end |
Instance Attribute Details
#bytes ⇒ Object
Returns the value of attribute bytes.
79 80 81 |
# File 'lib/typst.rb', line 79 def bytes @bytes end |
Instance Method Details
#document ⇒ Object
86 87 88 |
# File 'lib/typst.rb', line 86 def document bytes.pack("C*").to_s end |