Skip to content

Commit

Permalink
Add Font resource declaration to templates. Thank you geekpex
Browse files Browse the repository at this point in the history
  • Loading branch information
jung-kurt committed Jun 5, 2016
1 parent 3cc1ba7 commit aad9690
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Binary file modified pdf/reference/Fpdf_CreateTemplate.pdf
Binary file not shown.
18 changes: 18 additions & 0 deletions template.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit aad9690

Please sign in to comment.