diff options
author | Jelmer Snoeck <jelmer.snoeck@gmail.com> | 2015-08-29 14:41:39 +0100 |
---|---|---|
committer | Jelmer Snoeck <jelmer.snoeck@gmail.com> | 2015-08-31 16:55:08 +0100 |
commit | bb0b7372a6e097a5a0efcbb7ca6cf6177813989e (patch) | |
tree | ce9b340f7c8d3ae63d96021d0d5631d3493c067d /fpdf.go | |
parent | 706d7cc75e1f533b761a62d22cb2fc06d09c2de9 (diff) |
Add Barcode contribution package.
This package adds the ability to easily add a barcode to the PDF. This
barcode is generated with the github.com/boombuler/barcode package.
It adds wrappers for all the available barcode types through the
`Register()` and `Register<Type>()` methods. These register methods put
the barcode on the PDF, but not on the page. They will return a unique
key that should be used later on with the `Barcode()` method scale the
barcode and put it on the page.
Diffstat (limited to 'fpdf.go')
-rw-r--r-- | fpdf.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -2365,6 +2365,12 @@ func (f *Fpdf) GetImageInfo(imageStr string) (info *ImageInfoType) { return f.images[imageStr] } +// GetConversionRatio returns the conversion ratio based on the unit given when +// creating the PDF. +func (f *Fpdf) GetConversionRatio() float64 { + return f.k +} + // GetXY returns the abscissa and ordinate of the current position. // // Note: the value returned for the abscissa will be affected by the current |