summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@gmail.com>2015-07-10 17:01:11 -0400
committerKurt Jung <kurt.w.jung@gmail.com>2015-07-10 17:01:11 -0400
commit9382b925ba21eecc97d70a4ce5388d70d40ff663 (patch)
tree9d4b774d1806216d136fbfca857f2518ae1a7450
parent1b5badf9c60caa9c79c9b2f6cb7f50f214c450ce (diff)
Quick start: generate file, not stream
-rw-r--r--doc.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc.go b/doc.go
index fd921f2..0977e99 100644
--- a/doc.go
+++ b/doc.go
@@ -65,13 +65,13 @@ Later, to receive updates, run
Quick Start
-The following Go code generates a simple PDF and writes it to standard output.
+The following Go code generates a simple PDF file.
pdf := gofpdf.New("P", "mm", "A4", "")
pdf.AddPage()
pdf.SetFont("Arial", "B", 16)
pdf.Cell(40, 10, "Hello, world")
- pdf.Output(os.Stdout)
+ err := pdf.OutputFileAndClose("hello.pdf")
See the functions in the fpdf_test.go file (shown as examples in this
documentation) for more advanced PDF examples.