summaryrefslogtreecommitdiff
path: root/fpdf_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'fpdf_test.go')
-rw-r--r--fpdf_test.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/fpdf_test.go b/fpdf_test.go
index 43cea30..5035bd8 100644
--- a/fpdf_test.go
+++ b/fpdf_test.go
@@ -2711,3 +2711,22 @@ func ExampleFpdf_SetUnderlineThickness() {
// Output:
// Successfully generated pdf/Fpdf_UnderlineThickness.pdf
}
+
+// ExampleFpdf_Cell_strikeout demonstrates striked-out text
+func ExampleFpdf_Cell_strikeout() {
+
+ pdf := gofpdf.New("P", "mm", "A4", "") // 210mm x 297mm
+ pdf.AddPage()
+
+ for fontSize := 4; fontSize < 40; fontSize += 10 {
+ pdf.SetFont("Arial", "S", float64(fontSize))
+ pdf.SetXY(0, float64(fontSize))
+ pdf.Cell(40, 10, "Hello World")
+ }
+
+ fileStr := example.Filename("Fpdf_Cell_strikeout")
+ err := pdf.OutputFileAndClose(fileStr)
+ example.Summary(err, fileStr)
+ // Output:
+ // Successfully generated pdf/Fpdf_Cell_strikeout.pdf
+}