+# Create the one-page version of the documentation
+onepageFile = open(global_site_dir + 'ardourmanual.html', 'w')
+opsidebar = BuildOnePageSidebar(fileStruct) # create the link sidebar
+onepage = onepage.replace('{% tree %}', opsidebar)
+onepage = onepage.replace('{{ content }}', '') # cleans up the last spaceholder
+onepageFile.write(onepage)
+onepageFile.close()
+
+if not quiet:
+ print('Generating the PDF...')
+# Create the PDF version of the documentation
+pdfpageFile = open(global_site_dir + 'pdf.html', 'w')
+pdfpage = pdfpage.replace('{% tree %}', opsidebar) # create the TOC
+pdfpage = pdfpage.replace('{{ content }}', '') # cleans up the last spaceholder
+pdfpageFile.write(pdfpage)
+pdfpageFile.close()
+
+from weasyprint import HTML
+doc = HTML(filename = global_site_dir + 'pdf.html') #, base_url = os.path.dirname(os.path.realpath(__file__)))
+doc.write_pdf(global_site_dir + 'manual.pdf')
+