summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorKurt Jung <kurt.w.jung@gmail.com>2015-08-27 08:00:23 -0400
committerKurt Jung <kurt.w.jung@gmail.com>2015-08-27 08:00:23 -0400
commit3a6634b2456fc0cd151e25cc90b3b6865bbb5332 (patch)
tree37e2cbe216c32e68a39546860100bc0e776e322a /contrib
parent968e3672ed1c1e4ff1cb1729584235ab1271a7e9 (diff)
Maintain aspect ratio of registered image
Diffstat (limited to 'contrib')
-rw-r--r--contrib/httpimg/httpimg_test.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/contrib/httpimg/httpimg_test.go b/contrib/httpimg/httpimg_test.go
index cf6e8d1..bf13492 100644
--- a/contrib/httpimg/httpimg_test.go
+++ b/contrib/httpimg/httpimg_test.go
@@ -7,15 +7,14 @@ import (
)
func ExampleRegister() {
- pdf := gofpdf.New("", "", "", "")
+ pdf := gofpdf.New("L", "mm", "A4", "")
pdf.SetFont("Helvetica", "", 12)
pdf.SetFillColor(200, 200, 220)
pdf.AddPage()
url := "https://github.com/jung-kurt/gofpdf/raw/master/image/logo_gofpdf.jpg?raw=true"
httpimg.Register(pdf, url, "")
- pdf.Image(url, 100, 100, 20, 20, false, "", 0, "")
-
+ pdf.Image(url, 15, 15, 267, 0, false, "", 0, "")
fileStr := example.Filename("contrib_httpimg_Register")
err := pdf.OutputFileAndClose(fileStr)
example.Summary(err, fileStr)