copy pages from the pdffilereader objects into the pdffilewriter object finallyuse the pdffilewriter object to write the output pdf creating pdffilewriter object creates only value that represents pdf document in python it doesn' create the actual pdf file for thatyou must call the pdffilewriter' write(method the write(method takes regular file object that has been opened in write-binary mode you can get such file object by calling python' open(function with two argumentsthe string of what you want the pdf' filename to be and 'wbto indicate the file should be opened in write-binary mode if this sounds little confusingdon' worry--you'll see how this works in the following code examples copying pages you can use pypdf to copy pages from one pdf document to another this allows you to combine multiple pdf filescut unwanted pagesor reorder pages download meetingminutes pdf and meetingminutes pdf from com/automatestuff and place the pdfs in the current working directory enter the following into the interactive shellimport pypdf pdf file open('meetingminutes pdf''rb'pdf file open('meetingminutes pdf''rb'pdf reader pypdf pdffilereader(pdf filepdf reader pypdf pdffilereader(pdf filepdfwriter pypdf pdffilewriter(for pagenum in range(pdf reader numpages)pageobj pdf reader getpage(pagenumpdfwriter addpage(pageobjfor pagenum in range(pdf reader numpages)pageobj pdf reader getpage(pagenumpdfwriter addpage(pageobjpdfoutputfile open('combinedminutes pdf''wb'pdfwriter write(pdfoutputfilepdfoutputfile close(pdf file close(pdf file close(open both pdf files in read binary mode and store the two resulting file objects in pdf file and pdf file call pypdf pdffilereader(and pass it pdf file to get pdffilereader object for meetingminutes pdf call it again and pass it pdf file to get pdffilereader object for meetingminutes pdf then create new pdffilewriter objectwhich represents blank pdf document working with pdf and word documents