diff options
author | Joop Kiefte <ikojba@gmail.com> | 2020-11-20 06:38:06 +0200 |
---|---|---|
committer | Joop Kiefte <ikojba@gmail.com> | 2020-11-20 06:38:06 +0200 |
commit | cf731d41b5fb8cb9cfbd664c010402b8e01c1f35 (patch) | |
tree | 910f5f3f86fef3c96c726f23c63e2d666668875d /pdf | |
parent | 851c6d046b61fced71fc46b43e54b7dc0ce4ef94 (diff) |
Correct pagenumber: first page doesn't have a number and title page doesn't count
Diffstat (limited to 'pdf')
-rw-r--r-- | pdf/create.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pdf/create.go b/pdf/create.go index 3a417f3..12b4662 100644 --- a/pdf/create.go +++ b/pdf/create.go @@ -31,13 +31,13 @@ func (t Tree) Render() { switch row.Type { case "newpage": block = "" + t.PDF.AddPage() t.PDF.SetHeaderFuncMode(func() { ln = 0 t.PDF.SetY(0.5) t.PDF.SetX(-1) - t.PDF.Cell(0, 0, strconv.Itoa(t.PDF.PageNo())+".") + t.PDF.Cell(0, 0, strconv.Itoa(t.PDF.PageNo()-1)+".") }, true) - t.PDF.AddPage() continue case "titlepage": block = "title" |