output = PdfFileWriter()
pdfOne = PdfFileReader(file(xFileNameOriginal, 'rb'))
for i in range(xPageStart, xPageEnd):
    output.addPage(pdfOne.getPage(i))
outputStream = file(xFileNameOutput, 'wb')
output.write(outputStream)
outputStream.close()
finding on which page a search string is located in a pdf document using python