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.32k stars 780 forks source link

Generate pdf from html template #139

Open mkatrantzis opened 6 years ago

mkatrantzis commented 6 years ago

Hi,

We are migrating from php to go and it would be nice if we could reuse our html templates. From what i've seen the current function supports only a subset of tags and as such we cant achieve the requested format/layout. Any plans on expanding that function to fully support html?

Would be nice to have CSS support from within the templates as well.

jung-kurt commented 6 years ago

Is there a particular script you use to extend FPDF's HTML support? (For example, script 42 seems to support a few more tags than tutorial 6 provides.)

mkatrantzis commented 6 years ago

In php we were using mpdf instead which had support for most tags out of the box but in Go fpdf seems to be the best library so far however not complete enough to support our templetas.

vineetvermait commented 6 years ago

Any Updates on this,..?

jung-kurt commented 6 years ago

Any Updates on this,..?

Regrettably, no.

Improved HTML to PDF conversion would be a very welcome enhancement to this library. But I think something as comprehensive as mpdf won't happen without a very dedicated effort. It would also solve the biggest limitation with the current implementation of gofpdf, namely, support for RTL and CJK languages. I'd love to see it happen and hope that some party with more time than I have now can tackle it.