summaryrefslogtreecommitdiff
path: root/template.go
diff options
context:
space:
mode:
authord1ngd0 <paul.david.montag@gmail.com>2018-12-12 14:04:24 -0600
committerKurt Jung <kurt.w.jung@gmail.com>2018-12-12 15:04:24 -0500
commita8d8f9e6a80f014f8f5a2388fbf7f409fe9cf263 (patch)
tree5d362727bfa65589c7a6fe0cbf8ed5e5505874fd /template.go
parent95702eead4d148c6111f5a3ef7ef7cbc0c906b49 (diff)
Added the ability to have multiple pages in a template (#216)
* Added the ability to have multiple pages in a template Templates are now aware of the number of pages they have. The main additions are the FromPage and FromPages methods which allow you to extract a Template from a template if you pass in the page number. It follows the same page mechanism as FPDF where pages start in the index 1. * Update fpdf_test.go
Diffstat (limited to 'template.go')
-rw-r--r--template.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/template.go b/template.go
index d27bc40..1bcd25d 100644
--- a/template.go
+++ b/template.go
@@ -124,6 +124,9 @@ type Template interface {
Bytes() []byte
Images() map[string]*ImageInfoType
Templates() []Template
+ NumPages() int
+ FromPage(int) (Template, error)
+ FromPages() []Template
Serialize() ([]byte, error)
gob.GobDecoder
gob.GobEncoder