Documentation ¶
Overview ¶
Package example provides some helper routines for the test packages of gofpdf and its various contributed packages located beneath the contrib directory.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Filename ¶
Filename returns a qualified filename in which the example PDF directory path is prepended and the suffix ".pdf" is appended to the specified filename.
Example ¶
Test the Filename() and Summary() functions.
package main import ( "errors" "github.com/jung-kurt/gofpdf/internal/example" ) func main() { fileStr := example.Filename("example") example.Summary(errors.New("printer on fire"), fileStr) }
Output: printer on fire
func FontFile ¶
FontFile returns a qualified filename in which the path to the font directory is prepended to the specified filename.
func ImageFile ¶
ImageFile returns a qualified filename in which the path to the image directory is prepended to the specified filename.
func PdfFile ¶
PdfFile returns a qualified filename in which the path to the PDF output directory is prepended to the specified filename.
func Summary ¶
Summary generates a predictable report for use by test examples. If the specified error is nil, the filename delimiters are normalized and the filename printed to standard output with a success message. If the specified error is not nil, its String() value is printed to standard output.
Types ¶
This section is empty.