page numrebs!

This commit is contained in:
dickreckard 2022-12-14 00:57:11 +01:00
parent 71d8497a3c
commit c88a704840

View File

@ -99,6 +99,9 @@ for chapter in chapters:
preview = requests.get(chapter.replace('pad/','preview.html'))
style = requests.get(chapter.replace('pad/','stylesheet.css'))
if page > 0:
style+='@page:first { counter-increment: page '+page+'; }'
stylefile=localhost+'.'+name+'/stylesheet.css'
with open(stylefile, 'w') as file:
file.write(style.text)
@ -132,7 +135,7 @@ for chapter in chapters:
outputs.append(localhost+pdffile)
counter+=1
pages=pages+pypdftk.get_num_pages(localhost+pdffile)
page=page+pypdftk.get_num_pages(localhost+pdffile)
# compiling all the files in one big pdf!