python pdf (PyPDF2 module) - How to split/merge this?
<p>I was trying to split &amp; merge pdf files so that i can remove the first page of each pdf files.. Here's the code.</p>

<pre><code>    #python3

    #split and merge pdf files!


    import os, PyPDF2

    pdfFiles = []
    os.chdir('C:\\Users\\Cyber\\Downloads\\5-111-fall-2008\\5-111-fall-2008\\contents\\readings-and-lecture-notes')



    for filename in os.listdir('.'):
        if filename.endswith('pdf'):
            pdfFiles.append(filename)

    pdfWriter = PyPDF2.PdfFileWriter()

    for filename in pdfFiles:
        pdfFileObj = open(filename, 'rb')
        pdfReader = PyPDF2.PdfFileReader(pdfFileObj)

        for pageNum in range(1, pdfReader.numPages):
            pageObj = pdfReader.getPage(pageNum)
            pdfWriter.addPage(pageObj)

    pdfOutput = open('Merged.pdf', 'wb')
    pdfWriter.write(pdfOutput)
    pdfOutput.close()
</code></pre>

<p>And then i get the following error...</p>

<p>: PdfReadWarning: Xref table not zero-indexed. ID numbers for objects will be corrected. [pdf.py:1736]</p>

<p>I searched for that error and found out that it indicates there may have been an issue with the creation of the PDF itself.</p>

<p>Though i get my merged.pdf file as i wanted, i want to know what that exactly  means &amp; how to avoid getting them.</p>

<p>This warning means that the first section of the xref table does not begin with object zero. There may have been an error in writing the PDF. If strict = False, PyPDF2 will try to correct the object ID numbers. If strict = True, they will not be corrected.The default is True. Try <code>PyPDF2.PdfFileReader(pdfFileObj,False)</code></p>

python pypdf2