summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pdf/reference/Fpdf_CreateTemplate.pdfbin10763 -> 10829 bytes
-rw-r--r--template.go18
2 files changed, 18 insertions, 0 deletions
diff --git a/pdf/reference/Fpdf_CreateTemplate.pdf b/pdf/reference/Fpdf_CreateTemplate.pdf
index 0223da9..bc0d34c 100644
--- a/pdf/reference/Fpdf_CreateTemplate.pdf
+++ b/pdf/reference/Fpdf_CreateTemplate.pdf
Binary files differ
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 {