diff options
author | Kurt <kurt.w.jung@gmail.com> | 2019-10-05 21:09:23 -0400 |
---|---|---|
committer | Kurt <kurt.w.jung@gmail.com> | 2019-10-05 21:09:23 -0400 |
commit | 9b6b7f4e784dd67fac27ae8fd4aea38136afa1c5 (patch) | |
tree | 16b8a5b26837ebc4259ed20586bbe4022e8e270e | |
parent | b1657c7960b94f9c1f90fa1efaf49e04f78e0f91 (diff) |
-rw-r--r-- | fpdf.go | 5 | ||||
-rw-r--r-- | fpdf_test.go | 4 |
2 files changed, 5 insertions, 4 deletions
@@ -3779,8 +3779,9 @@ func (f *Fpdf) SetJavascript(script string) { } // RegisterAlias adds an (alias, replacement) pair to the document so we can -// replace all occurrences of that alias after writing but before the -// document is closed. +// replace all occurrences of that alias after writing but before the document +// is closed. Functions ExampleFpdf_RegisterAlias() and +// ExampleFpdf_RegisterAlias_utf8() in fpdf_test.go demonstrate this method. func (f *Fpdf) RegisterAlias(alias, replacement string) { // Note: map[string]string assignments embed literal escape ("\00") sequences // into utf16 key and value strings. Consequently, subsequent search/replace diff --git a/fpdf_test.go b/fpdf_test.go index 30ee11b..0bcd2f6 100644 --- a/fpdf_test.go +++ b/fpdf_test.go @@ -2273,10 +2273,10 @@ func ExampleFpdf_RegisterAlias() { // Successfully generated pdf/Fpdf_RegisterAlias.pdf } -// ExampleFpdf_RegisterAliasUTF8 demonstrates how to use `RegisterAlias` to +// ExampleFpdf_RegisterAlias_utf8 demonstrates how to use `RegisterAlias` to // create a table of contents. This particular example demonstrates the use of // UTF-8 aliases. -func ExampleFpdf_RegisterAliasUTF8() { +func ExampleFpdf_RegisterAlias_utf8() { pdf := gofpdf.New("P", "mm", "A4", "") pdf.AddUTF8Font("dejavu", "", example.FontFile("DejaVuSansCondensed.ttf")) pdf.SetFont("dejavu", "", 12) |