Embedding
One shortcode is enough. Put einvoice_viewer in square brackets on any page. With the attribute bt=”1″ the business-term labels start visible, with bt=”0″ hidden — and the visitor can toggle them at any time.
The EN 16931 knowledge lives in a layer of its own (includes/core/), cleanly separated from the WordPress-facing code — which keeps the plugin’s own code small and auditable. No PDF writer, no template engine, no framework is dragged along.
SPEV_Renderer::model() hands you the whole invoice as a nested array — for exports, your own REST endpoints or your own rendering; model_json() returns the same thing as a JSON string. The shape of the model is fixed as a versioned JSON Schema, derived from the actual output rather than maintained beside it. A layout of your own is one class; the extraction logic stays untouched.
If you would rather ask for the view from your own code than through the shortcode, there is the REST route POST /wp-json/einvoice/v1/render alongside the AJAX action. Both call the same code, neither is deprecated.