summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--contrib/fhttp/fhttp.go4
-rw-r--r--contrib/fhttp/fhttp_test.go8
2 files changed, 6 insertions, 6 deletions
diff --git a/contrib/fhttp/fhttp.go b/contrib/fhttp/fhttp.go
index cf13b25..8887fbc 100644
--- a/contrib/fhttp/fhttp.go
+++ b/contrib/fhttp/fhttp.go
@@ -5,10 +5,10 @@ import (
"net/http"
)
-// RegisterRemoteImage registers a remote image. Downloading the image from the
+// RegisterHttpImage registers a HTTP image. Downloading the image from the
// provided URL and adding it to the PDF but not adding it to the page. Use
// Image() with the same URL to add the image to the page.
-func RegisterRemoteImage(f *gofpdf.Fpdf, urlStr, tp string) (info *gofpdf.ImageInfoType) {
+func RegisterHttpImage(f *gofpdf.Fpdf, urlStr, tp string) (info *gofpdf.ImageInfoType) {
info = f.GetImageInfo(urlStr)
if info != nil {
diff --git a/contrib/fhttp/fhttp_test.go b/contrib/fhttp/fhttp_test.go
index 57bf175..e09328a 100644
--- a/contrib/fhttp/fhttp_test.go
+++ b/contrib/fhttp/fhttp_test.go
@@ -25,19 +25,19 @@ func summary(err error, fileStr string) {
}
}
-func ExampleFpdf_AddRemoteImage() {
+func ExampleFpdf_AddHttpImage() {
pdf := gofpdf.New("", "", "", "")
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"
- fhttp.RegisterRemoteImage(pdf, url, "")
+ fhttp.RegisterHttpImage(pdf, url, "")
pdf.Image(url, 100, 100, 20, 20, false, "", 0, "")
- fileStr := exampleFilename("Fpdf_AddRemoteImage")
+ fileStr := exampleFilename("Fpdf_AddHttpImage")
err := pdf.OutputFileAndClose(fileStr)
summary(err, fileStr)
// Output:
- // Successfully generated pdf/Fpdf_AddRemoteImage.pdf
+ // Successfully generated pdf/Fpdf_AddHttpImage.pdf
}