Created
March 28, 2018 16:17
-
-
Save parzibyte/700648f5a33df6017c821632a1d82ce5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PyPDF2 import PdfFileMerger | |
import os | |
pdfs = [archivo for archivo in os.listdir('./') if archivo.endswith(".pdf")] | |
nombre_archivo_salida = "salida.pdf" | |
fusionador = PdfFileMerger() | |
for pdf in pdfs: | |
fusionador.append(open(pdf, 'rb')) | |
with open(nombre_archivo_salida, 'wb') as salida: | |
fusionador.write(salida) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment