Skip to content

Commit

Permalink
Reference examples files in comment for RegisterAlias()
Browse files Browse the repository at this point in the history
  • Loading branch information
jung-kurt committed Oct 6, 2019
1 parent b1657c7 commit 9b6b7f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions fpdf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions fpdf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9b6b7f4

Please sign in to comment.