From 3a6634b2456fc0cd151e25cc90b3b6865bbb5332 Mon Sep 17 00:00:00 2001 From: Kurt Jung Date: Thu, 27 Aug 2015 08:00:23 -0400 Subject: Maintain aspect ratio of registered image --- contrib/httpimg/httpimg_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'contrib') 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) -- cgit v1.2.1-24-ge1ad