Export PDF

Trigger Event #

Now that the editor is set up in your application and users are creating content, it's time to export PDF. Here's how you can export PDF.
mailui.exportPdf(function (data) { const json = data.json; console.log(json); });

Pass Export Options #

You can also provide specific options to this function as an additional argument. View all options.
mailui.exportPdf(function (data) { const json = data.json; console.log(json); }, { mergeTags: { first_name: "John", last_name: "Author", } });

Callback Parameters #

PropertyDescriptionType
jsonThis is the JSON of the designJSON

Export Options #

PropertyRequiredDescriptionTypeDefault
ampNoIt optimizes the content to load faster on mobile devices.
{
    amp: false;
}
Booleanfalse
mergeTagsNomergeTags allows dynamic content to be injected based on specified variables or data tags within the project.
{
    mergeTags: {
      first_name: "John",
      last_name: "Author",
    }
}
Object
displayConditionsNodisplayCondition allows you to set rules for when and how certain elements or content are displayed, based on conditions like user behavior.
{
    displayConditions: {
      ismen: true,
      iswomen: false,
      ischild: false,
    }
}
Object

Explore Our Email Builder