<commit_before>"""Write PDF

This program uses :py:mod:`PyPDF4` to write PDF documents.

Note:
    * Example PDFs can be downloaded from http://nostarch.com/automatestuff/
    * Book uses PyPDF2; I'm an overachiever that uses PyPDF4

"""


def main():
    import PyPDF4

    # Copying Pages
    pdf1File = open("meetingminutes.pdf", "rb")
    pdf2File = open("meetingminutes2.pdf", "rb")
    pdf1Reader = PyPDF4.PdfFileReader(pdf1File)
    pdf2Reader = PyPDF4.PdfFileReader(pdf2File)
    pdfWriter = PyPDF4.PdfFileWriter()

    for pageNum in range(pdf1Reader.numPages):
        pageObj = pdf1Reader.getPage(pageNum)<commit_msg>Update P2_writePDF.py moved module reference from PyPDF4 to PyPDF2<commit_after>"""Write PDF

This program uses PyPDF4 to write PDF documents.

Note:
    * Example PDFs can be downloaded from http://nostarch.com/automatestuff/
    * Book uses :py:mod:`PyPDF2`; I'm an overachiever that uses PyPDF4

"""


def main():
    import PyPDF4

    # Copying Pages
    pdf1File = open("meetingminutes.pdf", "rb")
    pdf2File = open("meetingminutes2.pdf", "rb")
    pdf1Reader = PyPDF4.PdfFileReader(pdf1File)
    pdf2Reader = PyPDF4.PdfFileReader(pdf2File)
    pdfWriter = PyPDF4.PdfFileWriter()

    for pageNum in range(pdf1Reader.numPages):
        pageObj = pdf1Reader.getPage(pageNum)
{'fraction_non_alphanumeric': 0.10466004583651642, 'fraction_numerical': 0.026737967914438502, 'mean_word_length': 3.924812030075188, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4043860', 'n_tokens_mistral': 463, 'n_tokens_neox': 445, 'n_words': 109}