From cae789a4e309eb39bd6145f93361a3745effbb2d Mon Sep 17 00:00:00 2001 From: Kurt Jung Date: Sat, 10 Oct 2015 06:23:36 -0400 Subject: Add method to fix document creation date --- def.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'def.go') diff --git a/def.go b/def.go index f1c8d7b..50a3f70 100644 --- a/def.go +++ b/def.go @@ -19,6 +19,7 @@ package gofpdf import ( "bytes" "io" + "time" ) // Version of FPDF from which this package is derived @@ -216,6 +217,7 @@ type Fpdf struct { author string // author keywords string // keywords creator string // creator + creationDate time.Time // override for dcoument CreationDate value aliasNbPagesStr string // alias for total number of pages pdfVersion string // PDF version number fontDirStr string // location of font definition files -- cgit v1.2.1-24-ge1ad From e924055b983321336e31f556f5235ea79fe72134 Mon Sep 17 00:00:00 2001 From: Kurt Jung Date: Sat, 10 Oct 2015 09:11:53 -0400 Subject: Implement conditional catalog sort feature --- def.go | 1 + 1 file changed, 1 insertion(+) (limited to 'def.go') diff --git a/def.go b/def.go index 50a3f70..2c4d33d 100644 --- a/def.go +++ b/def.go @@ -235,6 +235,7 @@ type Fpdf struct { err error // Set if error occurs during life cycle of instance protect protectType // document protection structure layer layerRecType // manages optional layers in document + catalogSort bool // sort resource catalogs in document colorFlag bool // indicates whether fill and text colors are different color struct { // Composite values of colors draw, fill, text clrType -- cgit v1.2.1-24-ge1ad From 92858a8b5ff04e4196597d9d517f3b2a0d651579 Mon Sep 17 00:00:00 2001 From: Kurt Jung Date: Sat, 10 Oct 2015 15:24:43 -0400 Subject: Conditionally sort image catalog. Correct small typos. --- def.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'def.go') diff --git a/def.go b/def.go index 2c4d33d..4c99733 100644 --- a/def.go +++ b/def.go @@ -151,7 +151,7 @@ type InitType struct { // from arbitrary locations (e.g. files, zip files, embedded font resources). // // Open provides an io.Reader for the specified font file (.json or .z). The file name -// does never include a path. Open returns an error if the specified file cannot be opened. +// never includes a path. Open returns an error if the specified file cannot be opened. type FontLoader interface { Open(name string) (io.Reader, error) } @@ -162,7 +162,7 @@ type Fpdf struct { 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 + templateObjects map[int64]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