diff options
author | Kurt <kurt.w.jung@gmail.com> | 2017-11-12 14:04:27 -0500 |
---|---|---|
committer | Kurt <kurt.w.jung@gmail.com> | 2017-11-12 14:04:27 -0500 |
commit | 7751c17f106d9d7d4c6c290b969ece1c8dab4371 (patch) | |
tree | fc51f6814469f13161138cda99442c95c91c78ec /fpdf_test.go | |
parent | 5e5bb8c2a2d6d41c3d0ef93f5d6181e7f1070a33 (diff) |
Add partial support for spot colors. This does not yet include gradients, etc
Diffstat (limited to 'fpdf_test.go')
-rw-r--r-- | fpdf_test.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fpdf_test.go b/fpdf_test.go index db46528..76ef558 100644 --- a/fpdf_test.go +++ b/fpdf_test.go @@ -2046,3 +2046,17 @@ func ExampleFpdf_SetJavascript() { // Output: // Successfully generated pdf/Fpdf_SetJavascript.pdf } + +// This example demonstrates spot color use +func ExampleFpdf_AddSpotColor() { + pdf := gofpdf.New("P", "mm", "A4", "") + pdf.AddSpotColor("PANTONE 145 CVC", 0, 42, 100, 25) + pdf.AddPage() + pdf.SetFillSpotColor("PANTONE 145 CVC", 90) + pdf.Rect(80, 40, 50, 50, "F") + fileStr := example.Filename("Fpdf_AddSpotColor") + err := pdf.OutputFileAndClose(fileStr) + example.Summary(err, fileStr) + // Output: + // Successfully generated pdf/Fpdf_AddSpotColor.pdf +} |