From b1665e4acd25607dff43d0a714e92752d86b0dec Mon Sep 17 00:00:00 2001 From: guanjihuan Date: Tue, 4 Jul 2023 14:48:49 +0800 Subject: [PATCH] Update combine_two_pdf_files.py --- .../combine_two_pdf_files.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/language_learning/2023.06.28_combine_two_pdf_files/combine_two_pdf_files.py b/language_learning/2023.06.28_combine_two_pdf_files/combine_two_pdf_files.py index 32411c9..058ba7c 100644 --- a/language_learning/2023.06.28_combine_two_pdf_files/combine_two_pdf_files.py +++ b/language_learning/2023.06.28_combine_two_pdf_files/combine_two_pdf_files.py @@ -25,10 +25,8 @@ with open('b.pdf', 'rb') as file2: output_pdf.add_page(pdf2.pages[page]) # 保存合并后的PDF文件 -with open('combined_file.pdf', 'wb') as merged_file: - output_pdf.write(merged_file) - - +with open('combined_file.pdf', 'wb') as combined_file: + output_pdf.write(combined_file) # import guan -# guan.combine_two_pdf_files(input_file1='a.pdf', input_file2='b.pdf', output_file='combined_file.pdf') \ No newline at end of file +# guan.combine_two_pdf_files(input_file_1='a.pdf', input_file_2='b.pdf', output_file='combined_file.pdf') \ No newline at end of file