Skip to content

Dynamic Template Options

Document File Naming

filename_format Join list of data path values to format filename.
filename_separator (optional, default: _) join using separator.

json
{
    "uhuu_dynamic_options" : {
        "filename_format" : ["listing.detail.wp_propertyreferencenumber__c", "language"],
        "filename_separator" : "_" 
    }
}
// output 
// "20.69.435_de.pdf"

_ static parameter

If data path starts with _ or - the value will be considered as a static parameter.

json
{
    "uhuu_dynamic_options" : {
        "filename_format" : [   
            "listing.detail.wp_propertyreferencenumber__c", 
            "_Doku",
            "language",            
        ],
        "filename_separator" : "_" 
    }
}
// output 
// "20.69.435_Doku_de.pdf"

Filename helper methods

now() : Append current date YYYY-MM-DD-HHmm to filename_format.
today() : Append current date YYYY-MM-DD to filename_format.

json
{
    "uhuu_dynamic_options" : {
        "filename_format" : [   
            "listing.detail.wp_propertyreferencenumber__c", 
            "_Doku",
            "now()",            
        ],
        "filename_separator" : "_" 
    }
}
// output 
// "20.69.435_Doku_2024-04-03-0826.pdf"

File names are limited to 60 characters

Any exceeding characters will be truncated upon reaching this limit.

Create PDF of a website

remote_url Create PDF of a website or use dynamic template url.

json
{
    "uhuu_dynamic_options" : {
        "remote_url" : "https://app.uhuu.io/print"
    }
}

Preview Options

Preview options used in uhuu shop.

json
{
    "uhuu_preview" : {
        "low" : true,
        "mode" : "horizontal",
        "url" : "https://sample.com/template-url.html"
    }
}