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.31k stars 777 forks source link

Border is coverd by fill-color #239

Open klixpert opened 5 years ago

klixpert commented 5 years ago

If you use CellFormat with the borderStr "LB" or anything else the border gets coverd by the fill color. If you use the borderStr "1" everythin is fine.

https://github.com/jung-kurt/gofpdf/blob/24315acbbda57c4f6b80c8441fd108087dd7e305/fpdf.go#L1991

jung-kurt commented 5 years ago

It looks like the fill/border code in this range is improperly factored. The partial border code uses a fill code of 'S', that is, it assumes there will be no fill. The solution may be as easy as a conditional statement right beneath

if len(borderStr) > 0 && borderStr != "1" {

that sets the op code to 's' or 'S' and then uses that op code instead of the hard-code 'S' in the subsequent s.printf lines. If you don't care to tackle this I will try to get to it in the next few days.

klixpert commented 5 years ago

no worry. I just noticed.

Am Mo., 8. Apr. 2019 um 22:45 Uhr schrieb Kurt Jung < notifications@github.com>:

It looks like the fill/border code in this range https://github.com/jung-kurt/gofpdf/blob/24315acbbda57c4f6b80c8441fd108087dd7e305/fpdf.go#L1988-L2025 is improperly factored. The partial border code uses a fill code of 'S', that is, it assumes there will be no fill. The solution may be as easy as a conditional statement right beneath

if len(borderStr) > 0 && borderStr != "1" {

that sets the op code to 's' or 'S' and then uses that op code instead of the hard-code 'S' in the subsequent s.printf lines. If you don't care to tackle this I will try to get to it in the next few days.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jung-kurt/gofpdf/issues/239#issuecomment-481000877, or mute the thread https://github.com/notifications/unsubscribe-auth/AskI8WPhHzFtjWM0PqUusI6K3YsUE5PMks5ve6pfgaJpZM4ciJ-x .

-- Sie erhalten diese Nachricht, weil Sie in Google Groups E-Mails von der Gruppe "Technik" abonniert haben. Wenn Sie sich von dieser Gruppe abmelden und keine E-Mails mehr von dieser Gruppe erhalten möchten, senden Sie eine E-Mail an technik+unsubscribe@klixpert.io. Wenn Sie in dieser Gruppe einen Beitrag posten möchten, senden Sie eine E-Mail an technik@klixpert.io. Wenn Sie diese Diskussion im Web verfolgen möchten, rufen Sie https://groups.google.com/a/klixpert.io/d/msgid/technik/jung-kurt/gofpdf/issues/239/481000877%40github.com https://groups.google.com/a/klixpert.io/d/msgid/technik/jung-kurt/gofpdf/issues/239/481000877%40github.com?utm_medium=email&utm_source=footer auf.

--

WE GROW YOUR BUSINESS!

digital. sales. now. Florian Narr KLIXPERT.io m: +43 676 971 01 12 w: www.klixpert.io e: flo@klixpert.io mario@klixpert.io [image: Inbound Certification] [image: HubSpot Marketing Software Certification] [image: Agency Partner Certification]