- write-document DOC FILE #!optional VERSION TRAILER-EXTRA HEADER-BYTESprocedure
Writes DOC to FILE. VERSION (default: DOC's own PDF version, set by build-doc) is the PDF version string written to the file header; it can be overridden here independently of DOC's version. TRAILER-EXTRA (default "") is raw text appended to the trailer dictionary, after /Root.
HEADER-BYTES (default #f), when given, is a bytevector written unchanged on its own line straight after the %PDF-x.y header. PDF/A uses this for a comment line of four or more bytes above 127, which tells file-transfer tools that the file is binary; for example (bytevector 37 226 227 207 211).