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.34k stars 787 forks source link

UTF-8 support. Use AddUTF8Font to add TTF font with UTF-8 symbols. #237

Closed ArtemKor closed 5 years ago

ArtemKor commented 5 years ago

See ExampleFpdf_AddUTF8Font for example.

This is based on tFPDF 1.25 implementation.

jung-kurt commented 5 years ago

Wow, @ArtemKor, this is a remarkable contribution. Many thanks!

The obstacle here is the license. tFPDF is licensed with the LGPL which will be a problem for many users of gofpdf. Maybe one way forward would be for you to fork the repository and I can place a prominent note on gofpdf's README sending people to your project if they're OK with LGPL.

Your thoughts?

OlegFX commented 5 years ago

I'm not sure if we must keep tFPDF license here - this was done with an eye on the PHP tFPDF but in own way.

ArtemKor commented 5 years ago

Can we merge it keeping MIT license?

jung-kurt commented 5 years ago

Can we merge it keeping MIT license?

I'd like to, but I want to make certain that we're doing so properly. Maybe we can have the author of tFPDF (I assume this is Ian Back who wrote the original script) view the diffs and give us his assurance that merging your Go adaptation doesn't violate his terms.

One way or another, your good work is valuable and needs to be available, either in this library with the MIT license or a fork with the more restrictive LGPL. Thanks again for your efforts -- the lack of UTF-8 support has been the biggest shortcoming in gofpdf.

OlegFX commented 5 years ago

I've sent a letter to Ian asking him to participate in this discussion.

jung-kurt commented 5 years ago

I've sent a letter to Ian asking him to participate in this discussion.

Thanks, @OlegFX.

jung-kurt commented 5 years ago

If no contact has been made with the author of tFPDF, I think the best course forward is for @ArtemKor to begin a fork of this project and license it with LGPL. I can help with the details. Also, when this is complete I will add a prominent paragraph to the README that points package users to the new project.

OlegFX commented 5 years ago

@jung-kurt could you contact me by email: oleg@oleg.name to discuss it? We aren't ready to use LGPL license here because we added UTF-8 support as requirements for commercial project, also LGPL is a bad choice for Go libraries. I believe it should be free (MIT) even if we have to completely rewrite it.

jung-kurt commented 5 years ago

Have you followed issue #227? @d1ngd0 has done good work in blending gofpdf and gopdf. I don't believe the package is complete yet but Paul says the hard parts are complete. Both packages are released under the MIT licence.