From bb287515d3b5c5b4ca7665a64a9224e8b6038804 Mon Sep 17 00:00:00 2001 From: Paul Montag Date: Wed, 31 Oct 2018 19:56:01 -0500 Subject: Added Ability to turn template into a byte string --- template.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'template.go') diff --git a/template.go b/template.go index 60b076b..2b886ed 100644 --- a/template.go +++ b/template.go @@ -18,6 +18,7 @@ package gofpdf */ import ( + "encoding/gob" "sort" ) @@ -107,6 +108,8 @@ type Template interface { Bytes() []byte Images() map[string]*ImageInfoType Templates() []Template + gob.GobDecoder + gob.GobEncoder } func (f *Fpdf) templateFontCatalog() { -- cgit v1.2.1-24-ge1ad From 01381ea7603b12304064fcd01a49b1cc4434b4ca Mon Sep 17 00:00:00 2001 From: Paul Montag Date: Wed, 7 Nov 2018 08:51:37 -0600 Subject: Created helper functions for serialiation --- template.go | 1 + 1 file changed, 1 insertion(+) (limited to 'template.go') diff --git a/template.go b/template.go index 2b886ed..9abdf62 100644 --- a/template.go +++ b/template.go @@ -108,6 +108,7 @@ type Template interface { Bytes() []byte Images() map[string]*ImageInfoType Templates() []Template + Serialize() ([]byte, error) gob.GobDecoder gob.GobEncoder } -- cgit v1.2.1-24-ge1ad