summaryrefslogtreecommitdiff
path: root/fpdf_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'fpdf_test.go')
-rw-r--r--fpdf_test.go14
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
+}