Serializes a PaperForge.Document into a valid PDF binary.
The writer is responsible for:
- writing the PDF header;
- serializing indirect objects;
- calculating byte offsets;
- generating the cross-reference table;
- generating the trailer;
- writing
startxrefand the EOF marker.
Summary
Functions
Converts a document into a complete PDF binary.
Functions
@spec to_binary(PaperForge.Document.t()) :: binary()
Converts a document into a complete PDF binary.
Example
binary =
PaperForge.Writer.to_binary(document)
File.write!(
"document.pdf",
binary
)