Skip to content

Commit

Permalink
merge function
Browse files Browse the repository at this point in the history
  • Loading branch information
GreatRSingh committed Dec 15, 2023
1 parent ccd63e6 commit 66fddfb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions new-website/utils/tutorials/build_pdf_book.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import pandas as pd
import pdfkit
from utils import numeric_sorter
from typing import List


INFO_PATH = "/workspaces/deepchem.github.io/new-website/utils/tutorials/website-render-order/"
Expand Down Expand Up @@ -58,6 +59,21 @@ def merge_pdf():
command = command + PDF_PATH + j[:-5] + "pdf "
os.system(command + "merged.pdf")

def merge_pdf_pages(a: List[str]):
"""Merges the PDFs.
Usage include adding title page, ending, etc.
Parameters
----------
a: List[str]
List of addresses of pdf to merge. In correct order.
"""
command = "pdfunite "
for i in a:
command = command + i + ' '
return command
#os.system(command, "merged.pdf")

if __name__ == "__main__":
os.system("mkdir " + PDF_PATH)
Expand Down

0 comments on commit 66fddfb

Please sign in to comment.