|
|
|
@ -223,7 +223,7 @@ func fpdfNew(orientationStr, unitStr, sizeStr, fontDirStr string, size SizeType,
|
|
|
|
|
// alternative to New() that provides additional customization. The PageSize()
|
|
|
|
|
// example demonstrates this method.
|
|
|
|
|
func NewCustom(init *InitType) (f *Fpdf) {
|
|
|
|
|
return fpdfNew(init.OrientationStr, init.UnitStr, init.SizeStr, init.FontDirStr, init.Size)
|
|
|
|
|
return fpdfNew(init.OrientationStr, init.UnitStr, init.SizeStr, init.FontDirStr, init.Size, init.Density)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// New returns a pointer to a new Fpdf instance. Its methods are subsequently
|
|
|
|
@ -246,8 +246,8 @@ func NewCustom(init *InitType) (f *Fpdf) {
|
|
|
|
|
// reference an actual directory if a font other than one of the core
|
|
|
|
|
// fonts is used. The core fonts are "courier", "helvetica" (also called
|
|
|
|
|
// "arial"), "times", and "zapfdingbats" (also called "symbol").
|
|
|
|
|
func New(orientationStr, unitStr, sizeStr, fontDirStr string) (f *Fpdf) {
|
|
|
|
|
return fpdfNew(orientationStr, unitStr, sizeStr, fontDirStr, SizeType{0, 0})
|
|
|
|
|
func New(orientationStr, unitStr, sizeStr, fontDirStr string, density float64) (f *Fpdf) {
|
|
|
|
|
return fpdfNew(orientationStr, unitStr, sizeStr, fontDirStr, SizeType{0, 0}, density)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Ok returns true if no processing errors have occurred.
|
|
|
|
@ -3079,12 +3079,12 @@ func (f *Fpdf) imageOut(info *ImageInfoType, x, y, w, h float64, allowNegativeX,
|
|
|
|
|
//
|
|
|
|
|
// Deprecated in favor of ImageOptions -- see that function for
|
|
|
|
|
// details on the behavior of arguments
|
|
|
|
|
func (f *Fpdf) Image(imageNameStr string, x, y, w, h float64, flow bool, tp string, link int, linkStr string) {
|
|
|
|
|
func (f *Fpdf) Image(imageNameStr string, x, y, w, h float64, flow bool, tp string, link int, linkStr string, density float64) {
|
|
|
|
|
options := ImageOptions{
|
|
|
|
|
ReadDpi: false,
|
|
|
|
|
ImageType: tp,
|
|
|
|
|
}
|
|
|
|
|
f.ImageOptions(imageNameStr, x, y, w, h, flow, options, link, linkStr)
|
|
|
|
|
f.ImageOptions(imageNameStr, x, y, w, h, flow, options, link, linkStr, density)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// ImageOptions puts a JPEG, PNG or GIF image in the current page. The size it
|
|
|
|
|