summaryrefslogtreecommitdiff
path: root/fpdf.go
diff options
context:
space:
mode:
authorKurt <kurt.w.jung@gmail.com>2019-02-28 08:48:51 -0500
committerKurt <kurt.w.jung@gmail.com>2019-02-28 08:48:51 -0500
commitbe3a6c4df9df642829ec0a95b43b280c263251e4 (patch)
tree5dccc2c04ec3b023d5e0bd37f6bfa3114abee787 /fpdf.go
parenta640ab8bad3c434166bb6358a3664a89d959ccb1 (diff)
Refer to example in SetPage() documentation.
Diffstat (limited to 'fpdf.go')
-rw-r--r--fpdf.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/fpdf.go b/fpdf.go
index f18f2ad..1199c4f 100644
--- a/fpdf.go
+++ b/fpdf.go
@@ -383,7 +383,9 @@ func (f *Fpdf) SetPageBoxRec(t string, pb PageBox) {
func (f *Fpdf) SetPageBox(t string, x, y, wd, ht float64) {
f.SetPageBoxRec(t, PageBox{SizeType{Wd: wd, Ht: ht}, PointType{X: x, Y: y}})
}
+
// SetPage sets the current page to that of a valid page in the PDF document.
+// The SetPage() example demonstrates this method.
func (f *Fpdf) SetPage(pageNum int) {
if (pageNum > 0) && (pageNum < len(f.pages)) {
f.page = pageNum
@@ -677,7 +679,7 @@ func (f *Fpdf) AddPageFormat(orientationStr string, size SizeType) {
return
}
if f.page != len(f.pages)-1 {
- f.page = len(f.pages)-1
+ f.page = len(f.pages) - 1
}
if f.state == 0 {
f.open()
@@ -693,7 +695,7 @@ func (f *Fpdf) AddPageFormat(orientationStr string, size SizeType) {
fc := f.color.fill
tc := f.color.text
cf := f.colorFlag
-
+
if f.page > 0 {
f.inFooter = true
// Page footer avoid double call on footer.