summaryrefslogtreecommitdiff
path: root/fpdf_test.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_test.go
parenta640ab8bad3c434166bb6358a3664a89d959ccb1 (diff)
Refer to example in SetPage() documentation.
Diffstat (limited to 'fpdf_test.go')
-rw-r--r--fpdf_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/fpdf_test.go b/fpdf_test.go
index 7969f94..3201ef9 100644
--- a/fpdf_test.go
+++ b/fpdf_test.go
@@ -2384,8 +2384,10 @@ func ExampleFpdf_SubWrite() {
// Successfully generated pdf/Fpdf_SubWrite.pdf
}
-func ExampleChangePage() {
- pdf := gofpdf.New("P", "cm", "A4", "")
+// ExampleFpdf_SetPage demomstrates the SetPage() method, allowing content
+// generation to be deferred until all pages have been added.
+func ExampleFpdf_SetPage() {
+ pdf := gofpdf.New("L", "cm", "A4", "")
pdf.SetFont("Times", "", 12)
var time []float64
@@ -2435,4 +2437,6 @@ func ExampleChangePage() {
fileStr := example.Filename("Fpdf_SetPage")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)
+ // Output:
+ // Successfully generated pdf/Fpdf_SetPage.pdf
}