def convertToPDF(self, from_page=<NUM_LIT:0>, to_page=-<NUM_LIT:1>, rotate=<NUM_LIT:0>):
if self.isClosed or self.isEncrypted:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>return _fitz.Document_convertToPDF(self, from_page, to_page, rotate)<EOL>
Convert document to PDF selecting page range and optional rotation. Output bytes object.