diff options
author | Nick White <git@njw.name> | 2019-11-12 11:22:40 +0000 |
---|---|---|
committer | Nick White <git@njw.name> | 2019-11-12 11:22:40 +0000 |
commit | 1ebb21bfd9523291b3cc6f59103204942c5b9400 (patch) | |
tree | b08a7b787cae907125b81997a2a45c861ebf14bd | |
parent | 488ae5c11cf7be4a8f35f6f82e19dda22663bcbf (diff) | |
parent | 1547698dfb3869e48bc79bc53a5e8d2d924a03e8 (diff) |
Merge branch 'addpdf'
-rw-r--r-- | go.mod | 10 | ||||
-rw-r--r-- | go.sum | 25 | ||||
-rw-r--r-- | pdf.go | 5 |
3 files changed, 37 insertions, 3 deletions
@@ -0,0 +1,10 @@ +module rescribe.xyz/bookpipeline + +require ( + github.com/aws/aws-sdk-go v1.25.31 + github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect + github.com/jung-kurt/gofpdf v1.15.1 + github.com/wcharczuk/go-chart v2.0.1+incompatible + rescribe.xyz/preproc v0.0.0-20191008143707-787d63fc5d13 + rescribe.xyz/utils v0.0.0-20191031104028-a46b217fd34f +) @@ -0,0 +1,25 @@ +github.com/aws/aws-sdk-go v1.25.31 h1:14mdh3HsTgRekePPkYcCbAaEXJknc3mN7f4XfsiMMDA= +github.com/aws/aws-sdk-go v1.25.31/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= +github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af h1:pmfjZENx5imkbgOkpRUYLnmbU7UEFbjtDA2hxJ1ichM= +github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= +github.com/jung-kurt/gofpdf v1.15.1 h1:vcj3SN7gwT+H6MoeTzZ+L58/i4cAAGW64Rl+cxKdpV0= +github.com/jung-kurt/gofpdf v1.15.1/go.mod h1:1hl7y57EsiPAkLbOwzpzqgx1A30nQCk/YmFV8S2vmK0= +github.com/phpdave11/gofpdi v1.0.7/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= +github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/wcharczuk/go-chart v2.0.1+incompatible h1:0pz39ZAycJFF7ju/1mepnk26RLVLBCWz1STcD3doU0A= +github.com/wcharczuk/go-chart v2.0.1+incompatible/go.mod h1:PF5tmL4EIx/7Wf+hEkpCqYi5He4u90sw+0+6FhrryuE= +golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a h1:gHevYm0pO4QUbwy8Dmdr01R5r1BuKtfYqRqF0h/Cbh0= +golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +rescribe.xyz/preproc v0.0.0-20191008143707-787d63fc5d13 h1:ew7m0RWpdzmTPO8/cJAGo4mcD9zkHHmAgyB4W6CxBLQ= +rescribe.xyz/preproc v0.0.0-20191008143707-787d63fc5d13/go.mod h1:EwmOikvi1rl/hmLgJRRabWMNYGl7vYVlMYipyH9RZ1E= +rescribe.xyz/utils v0.0.0-20191031104028-a46b217fd34f h1:HZETMrSpfJkBAvuvgZMqqOFdpoKE8E/Fb2lW2uMAIXk= +rescribe.xyz/utils v0.0.0-20191031104028-a46b217fd34f/go.mod h1:4L2vClYUFklsXggN0CUyP/alcgzLNRT0dMpMfEiVbX8= @@ -12,8 +12,7 @@ import ( "io/ioutil" "os" - //"rescribe.xyz/gofpdf@addtextrenderingmode" - "rescribe.xyz/gofpdf" + "github.com/jung-kurt/gofpdf" "rescribe.xyz/utils/pkg/hocr" ) @@ -79,7 +78,7 @@ func (p *Fpdf) AddPage(imgpath, hocrpath string) error { _ = p.fpdf.RegisterImageOptions(imgpath, gofpdf.ImageOptions{}) p.fpdf.ImageOptions(imgpath, 0, 0, pxToPt(b.Dx()), pxToPt(b.Dy()), false, gofpdf.ImageOptions{}, 0, "") - p.fpdf.SetTextRenderingMode(gofpdf.TextRenderingModeInvisible) + p.fpdf.SetTextRenderingMode(3) for _, l := range h.Lines { for _, w := range l.Words { |