func ExampleFpdf_RegisterImageOptionsReader() {
	var (
		opt    gofpdf.ImageOptions
		pdfStr string
		fl     *os.File
		err    error
	)

	pdfStr = example.Filename("Fpdf_RegisterImageOptionsReader")
	pdf := gofpdf.New("P", "mm", "A4", "")
	pdf.AddPage()
	pdf.SetFont("Arial", "", 11)
	fl, err = os.Open(example.ImageFile("logo.png"))
	if err == nil {
		opt.ImageType = "png"
		opt.AllowNegativePosition = true
		_ = pdf.RegisterImageOptionsReader("logo", opt, fl)
		fl.Close()
		for x := -20.0; x <= 40.0; x += 5 {
			pdf.ImageOptions("logo", x, x+30, 0, 0, false, opt, 0, "")
		}
		err = pdf.OutputFileAndClose(pdfStr)
	}
	example.Summary(err, pdfStr)
	// Output:
	// Successfully generated pdf/Fpdf_RegisterImageOptionsReader.pdf
}
// ExampleFpdf_RegisterImageOptionsReader demonstrates how to load an image
// from a io.Reader (in this case, a file) and register it with options.
ExampleFpdf_RegisterImageOptionsReader demonstrates how to load an image
from a io.Reader (in this case, a file) and register it with options.
// ExampleFpdf_RegisterImageOptionsReader demonstrates how to load an image // from a io . Reader ( in this case a file ) and register it with options .
func ExampleFpdf_RegisterImageOptionsReader() {
	var (
		opt    gofpdf.ImageOptions
		pdfStr string
		fl     *os.File
		err    error
	)
	pdfStr = example.Filename("Fpdf_RegisterImageOptionsReader")
	pdf := gofpdf.New("P", "mm", "A4", "")
	pdf.AddPage()
	pdf.SetFont("Arial", "", 11)
	fl, err = os.Open(example.ImageFile("logo.png"))
	if err == nil {
		opt.ImageType = "png"
		opt.AllowNegativePosition = true
		_ = pdf.RegisterImageOptionsReader("logo", opt, fl)
		fl.Close()
		for x := -20.0; x <= 40.0; x += 5 {
			pdf.ImageOptions("logo", x, x+30, 0, 0, false, opt, 0, "")
		}
		err = pdf.OutputFileAndClose(pdfStr)
	}
	example.Summary(err, pdfStr)
}
func ExampleFpdf_RegisterImageOptionsReader ( ) { var ( opt gofpdf . ImageOptions pdfStr string fl * os . File err error ) pdfStr = example . Filename ( " " ) pdf := gofpdf . New ( " " , " " , " " , " " ) pdf . AddPage ( ) pdf . SetFont ( " " , " " , 11 ) fl , err = os . Open ( example . ImageFile ( " " ) ) if err == nil { opt . ImageType = " " opt . AllowNegativePosition = true _ = pdf . RegisterImageOptionsReader ( " " , opt , fl ) fl . Close ( ) for x := - 20.0 ; x <= 40.0 ; x += 5 { pdf . ImageOptions ( " " , x , x + 30 , 0 , 0 , false , opt , 0 , " " ) } err = pdf . OutputFileAndClose ( pdfStr ) } example . Summary ( err , pdfStr ) }
ExampleFpdf_RegisterImageOptionsReader demonstrates how to load an image
from a io.Reader (in this case, a file) and register it with options.
ExampleFpdf_RegisterImageOptionsReader demonstrates how to load an image from a io . Reader ( in this case a file ) and register it with options .
// Output: // Successfully generated pdf/Fpdf_RegisterImageOptionsReader.pdf