jung-kurt / gofpdf

A PDF document generator with high level support for text, drawing and images
http://godoc.org/github.com/jung-kurt/gofpdf
MIT License
4.29k stars 772 forks source link

Strikeout: use "S" as styleStr #299

Closed Rjinswand closed 4 years ago

Rjinswand commented 4 years ago

copied implementation of "underline" and set the line a little bit higher: text is striked-out

jung-kurt commented 4 years ago

Thanks @Rjinswand! Excellent feature.

Quick question about the modified import lines ("github.com/jung-kurt/gofpdf" -> "gofpdf"). Is this simplification made possible by the replace github.com/jung-kurt/gopdf => ./ line in go.mod?

jung-kurt commented 4 years ago

go vet -all (run with make check) doesn't like the simplified import:

imports gofpdf: malformed module path "gofpdf": missing dot in first path element

It may be best to stay with the fully qualified imports.

Rjinswand commented 4 years ago

to be honest: I don't know ;) I'm not so familiar with the build process of go

I could compile my fork since I couldn't import the "internal" directory from an external source. With my changes it works.

fpdf_test.go:37:2: use of internal package github.com/jung-kurt/gofpdf/internal/example not allowed

Rjinswand commented 4 years ago

ah, there's a typo in go.mod: gopdf vs. gofpdf

jung-kurt commented 4 years ago

ah, there's a typo in go.mod: gopdf vs. gofpdf

Right you are! I'll look into this.

jung-kurt commented 4 years ago

Thanks for contribution, @Rjinswand.

Import path adjustments have been an irritation when forking Go projects. The introduction of modules makes it a bit easier, see When should I use the replace directive? for more details.