Search code examples
encodingfpdfutfiso-8859-1fpdi

Is it possible to combine tfpdf with fpdi?


At this time, i fill an ISO-8859-1 pdf with fpdf and fpdi. I want to transform the pdf in UTF-8. Is it possible to use tfpdf with fpdi in order to deal with UTF-8 pdf ?


Solution

  • Currently only the outdated version 1 of FPDI is compatible with tFPDF. A simple demo is available on this page. Create this class:

    class FPDF extends tFPDF {}
    

    And load FPDI afterwards so it will extend this class.

    An update for FPDI 2 will follow.