From c27eea9fd19b65f75c4326c12446e829b39ab66d Mon Sep 17 00:00:00 2001 From: Paul Montag Date: Fri, 14 Dec 2018 11:34:00 -0600 Subject: 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. --- def.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'def.go') 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 -- cgit v1.2.1-24-ge1ad