Collecting data JSON to pass it to HTML tamplate to create PDF doc

HTML2PDF Im using this technique. But the thiing is he is showing dynamic data inside ul/li it is also usefull but i want ot create a more pretty PDF doc with table and header, so that is why im curious about my question