From bb0b7372a6e097a5a0efcbb7ca6cf6177813989e Mon Sep 17 00:00:00 2001 From: Jelmer Snoeck Date: Sat, 29 Aug 2015 14:41:39 +0100 Subject: 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()` 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. --- fpdf.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fpdf.go') diff --git a/fpdf.go b/fpdf.go index d77fd4b..da3d92a 100644 --- a/fpdf.go +++ b/fpdf.go @@ -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 -- cgit v1.2.1-24-ge1ad