summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Montag <pmontag@iseeme.com>2018-11-08 14:29:38 -0600
committerPaul Montag <pmontag@iseeme.com>2018-11-08 14:29:38 -0600
commit91898b5ca557dbf88649ee45b12a484d3780b05f (patch)
treea9faf21998a316347e749d5f560227b1a2082c70
parenta10ee5edb8fbe4edf56f06e58cba360044710517 (diff)
Added an error if an invalid box type is passed in
-rw-r--r--fpdf.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/fpdf.go b/fpdf.go
index d735269..9818aeb 100644
--- a/fpdf.go
+++ b/fpdf.go
@@ -358,6 +358,9 @@ func (f *Fpdf) SetPageBox(t string, pb PageBox) {
fallthrough
case "artbox":
t = "ArtBox"
+ default:
+ f.err = fmt.Sprintf("%s is not a valid page box type")
+ return
}
pb.X = pb.X * f.k