gofpdf icon indicating copy to clipboard operation
gofpdf copied to clipboard

Generate pdf from html template

Open mkatrantzis opened this issue 7 years ago • 4 comments

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.

mkatrantzis avatar Oct 13 '17 13:10 mkatrantzis

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.)

jung-kurt avatar Oct 13 '17 15:10 jung-kurt

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.

mkatrantzis avatar Oct 31 '17 17:10 mkatrantzis

Any Updates on this,..?

vineetvermait avatar Mar 15 '18 09:03 vineetvermait

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.

jung-kurt avatar Mar 15 '18 13:03 jung-kurt