From 0fb5126fefeb1a7be7ed1c4dac02539af931a237 Mon Sep 17 00:00:00 2001 From: Dave Barnes Date: Wed, 15 May 2019 10:45:22 -0500 Subject: Add support for imported objects and templates to version 1 of gofpdf. --- def.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'def.go') diff --git a/def.go b/def.go index ab4e81d..f725f01 100644 --- a/def.go +++ b/def.go @@ -504,6 +504,10 @@ type Fpdf struct { offsets []int // array of object offsets templates map[string]Template // templates used in this document templateObjects map[string]int // template object IDs within this document + importedObjs map[string][]byte // imported template objects (gofpdi) + importedObjPos map[string]map[int]string // imported template objects hashes and their positions (gofpdi) + importedTplObjs map[string]string // imported template names and IDs (hashed) (gofpdi) + importedTplIds map[string]int // imported template ids hash to object id int (gofpdi) buffer fmtBuffer // buffer holding in-memory PDF pages []*bytes.Buffer // slice[page] of page content; 1-based state int // current document state -- cgit v1.2.1-24-ge1ad From ce8a12ff5655c57989b925abc0b8a3a1e6535d59 Mon Sep 17 00:00:00 2001 From: Dave Barnes Date: Wed, 15 May 2019 11:25:39 -0500 Subject: Clean up code based on jung-kurt's feedback. --- def.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'def.go') diff --git a/def.go b/def.go index f725f01..efa573e 100644 --- a/def.go +++ b/def.go @@ -507,7 +507,7 @@ type Fpdf struct { importedObjs map[string][]byte // imported template objects (gofpdi) importedObjPos map[string]map[int]string // imported template objects hashes and their positions (gofpdi) importedTplObjs map[string]string // imported template names and IDs (hashed) (gofpdi) - importedTplIds map[string]int // imported template ids hash to object id int (gofpdi) + importedTplIDs map[string]int // imported template ids hash to object id int (gofpdi) buffer fmtBuffer // buffer holding in-memory PDF pages []*bytes.Buffer // slice[page] of page content; 1-based state int // current document state -- cgit v1.2.1-24-ge1ad