def write(self, garbage=<NUM_LIT:0>, clean=<NUM_LIT:0>, deflate=<NUM_LIT:0>, ascii=<NUM_LIT:0>, expand=<NUM_LIT:0>, linear=<NUM_LIT:0>, pretty=<NUM_LIT:0>, decrypt=<NUM_LIT:1>):
if self.isClosed or self.isEncrypted:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if self.pageCount < <NUM_LIT:1>:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>return _fitz.Document_write(self, garbage, clean, deflate, ascii, expand, linear, pretty, decrypt)<EOL>
Write document to a bytes object.