You can turn up your HTML variable into pdf. All you have to do is to set the variable and pass to Super PDF.
{% set html %}
<h1>This is a basic example</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod.</p>
{% endset %}
{% set settings = {
filename: "My_PDF",
} %}
{{ craft.superpdf.html(html, settings) }}
{% set html %}
<h1>This is a basic example</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod.</p>
{% endset %}
{% set settings = {
filename: "My_PDF",
type: 'object'
} %}
{% set object = craft.superpdf.html(html, settings) %}
// Printing object will return url by default.
PDF URL is: {{ object }}
// Object can be use to print different variables like this:
{{ object.filename }}
{{ object.kind }}
{{ object.size }}
{{ object.dateModified }}
{{ object.path }}
{{ object.url }}