summaryrefslogtreecommitdiff
path: root/template.go
diff options
context:
space:
mode:
authorKurt <kurt.w.jung@gmail.com>2016-06-05 12:27:31 -0400
committerKurt <kurt.w.jung@gmail.com>2016-06-05 12:27:31 -0400
commitaad9690dd29226455d39e15e57e48caa39ed7b67 (patch)
treeb1dd30a1fddaf1726a7f9cbc9dc10a0fc44bcca1 /template.go
parent3cc1ba71da5643706c65aeb1483b021e7385bebe (diff)
Add Font resource declaration to templates. Thank you geekpex
Diffstat (limited to 'template.go')
-rw-r--r--template.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/template.go b/template.go
index c9a33d5..6f29196 100644
--- a/template.go
+++ b/template.go
@@ -135,6 +135,24 @@ func (f *Fpdf) putTemplates() {
f.out("/Resources ")
f.out("<</ProcSet [/PDF /Text /ImageB /ImageC /ImageI]")
+ f.out("/Font <<")
+ {
+ var keyList []string
+ var font fontDefType
+ var key string
+ for key = range f.fonts {
+ keyList = append(keyList, key)
+ }
+ if f.catalogSort {
+ sort.Strings(keyList)
+ }
+ for _, key = range keyList {
+ font = f.fonts[key]
+ f.outf("/F%d %d 0 R", font.I, font.N)
+ }
+ }
+ f.out(">>")
+
tImages := t.Images()
tTemplates := t.Templates()
if len(tImages) > 0 || len(tTemplates) > 0 {