NOTE: Using Python 3.x for this tool
- OS
- RE
- SYS
- JSON
- REQUEST
- WEASYPRINT
- PyPDF2
- XML.DOM
- ElementTree
- URLLIB
- Install all dependencies to ensure the correctly function of the software.
- Instance the class and using it!.
#generate index from XML FILE using his PATH
tableOfContent, filenameOFfile = generateIndexListfromXML(document_path_name_XML, document_path_name_PDF, element_of_yourXML)
# You can generate TOC based in XML file and them you can merge with PDF file
#generate an HTML file with the INDEX of PDF
convertHTMLwithTOC(tableOfContent, filenameOFfile, title_of_document, 1)
#convert HTML to PDF
filename_PDF_withTOC = convertToPdf(filenameOFfile)
split_names_part1, split_names_part2 = PdfSplitToTwo(document_path_name_PDF, textToFindandSplit)
#merge PDFS using the TOC result and split one PDF
files = (filename_PDF_withTOC, split_names_part1)
pdfMerge('FINAL_DOCUMENT_WITH-TOC.pdf', files)