def insertPDF(self, docsrc, from_page=-<NUM_LIT:1>, to_page=-<NUM_LIT:1>, start_at=-<NUM_LIT:1>, rotate=-<NUM_LIT:1>, links=<NUM_LIT:1>):
if self.isClosed or self.isEncrypted:<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if id(self) == id(docsrc):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>sa = start_at<EOL>if sa < <NUM_LIT:0>:<EOL><INDENT>sa = self.pageCount<EOL><DEDENT>val = _fitz.Document_insertPDF(self, docsrc, from_page, to_page, start_at, rotate, links)<EOL>self._reset_page_refs()<EOL>if links:<EOL><INDENT>self._do_links(docsrc, from_page = from_page, to_page = to_page,<EOL>start_at = sa)<EOL><DEDENT>return val<EOL>
Copy page range ['from', 'to'] of source PDF, starting as page number 'start_at'.