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