diff options
-rw-r--r-- | def.go | 3 | ||||
-rw-r--r-- | fpdf_test.go | 7 |
2 files changed, 9 insertions, 1 deletions
@@ -430,7 +430,8 @@ type Pdf interface { SetLineWidth(width float64) SetLink(link int, y float64, page int) SetMargins(left, top, right float64) - SetPageBox(t string, pb PageBox) + SetPageBoxRec(t string, pb PageBox) + SetPageBox(t string, x, y, wd, ht float64) SetProtection(actionFlag byte, userPassStr, ownerPassStr string) SetRightMargin(margin float64) SetSubject(subjectStr string, isUTF8 bool) diff --git a/fpdf_test.go b/fpdf_test.go index 61dc6f9..9594431 100644 --- a/fpdf_test.go +++ b/fpdf_test.go @@ -57,6 +57,13 @@ func cleanup() { }) } +func TestFpdfImplementPdf(t *testing.T) { + // this will not compile if Fpdf and Tpl + // do not implement Pdf + var _ gofpdf.Pdf = (*gofpdf.Fpdf)(nil) + var _ gofpdf.Pdf = (*gofpdf.Tpl)(nil) +} + // TestIssue0116 addresses issue 116 in which library silently fails after // calling CellFormat when no font has been set. func TestIssue0116(t *testing.T) { |