summaryrefslogtreecommitdiff
path: root/def.go
diff options
context:
space:
mode:
authorPaul Montag <pmontag@iseeme.com>2018-12-14 11:34:00 -0600
committerPaul Montag <pmontag@iseeme.com>2018-12-17 08:32:16 -0600
commitc27eea9fd19b65f75c4326c12446e829b39ab66d (patch)
treeb29dd73fd266a9199fb4107ee78bde91340f8353 /def.go
parenta8d8f9e6a80f014f8f5a2388fbf7f409fe9cf263 (diff)
Refactored Encode and Decode functions, Fixed Template ID Conflicts
- Updated Encode and Decode to ensure templates and images are pointers to the original objects - Refactored so encoding no longer has to create p and o labels for images - removed id from template and generate it using Bytes instead.
Diffstat (limited to 'def.go')
-rw-r--r--def.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/def.go b/def.go
index b1dbc8c..3c4d902 100644
--- a/def.go
+++ b/def.go
@@ -486,8 +486,8 @@ type Fpdf struct {
page int // current page number
n int // current object number
offsets []int // array of object offsets
- templates map[int64]Template // templates used in this document
- templateObjects map[int64]int // template object IDs within this document
+ templates map[string]Template // templates used in this document
+ templateObjects map[string]int // template object IDs within this document
buffer fmtBuffer // buffer holding in-memory PDF
pages []*bytes.Buffer // slice[page] of page content; 1-based
state int // current document state