class_docstr: Sets up printing to the given file. If ``fp`` is omitted,
  ``sys.stdout.buffer`` or ``sys.stdout`` is assumed.
class_docstr_tok: ["Sets","up","printing","to","the","given","file",".","If","``","fp","``","is","omitted",",","``","sys.stdout.buffer","``","or","``","sys.stdout","``","is","assumed","."]
docstr: Set up printing of a document. (Write PostScript DSC header.)
docstr_tok: ["Set","up","printing","of","a","document",".","(","Write","PostScript","DSC","header",".",")"]
code: def begin_document(self, id=None):
      """Set up printing of a document. (Write PostScript DSC header.)"""
      # FIXME: incomplete
      self.fp.write(
          b"%!PS-Adobe-3.0\n"
          b"save\n"
          b"/showpage { } def\n"
          b"%%EndComments\n"
          b"%%BeginDocument\n"
      )
      # self.fp.write(ERROR_PS)  # debugging!
      self.fp.write(EDROFF_PS)
      self.fp.write(VDI_PS)
      self.fp.write(b"%%EndProlog\n")
      self.isofont = {}
  
file_path: pillow-simd/src/PIL/PSDraw.py
imports: import sys
  from .None import EpsImagePlugin
label_desc: Use image node_id 2 for calling the PSDraw obj's underlying member method code with example usage: obj.begin_document(id) without return types