Browse Source

page numrebs!

master
dickreckard 2 years ago
parent
commit
c88a704840
  1. 5
      pdf-compile.py

5
pdf-compile.py

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

Loading…
Cancel
Save