Action

PDF Export

Last update almost 5 years ago - Unlisted

Steps

  • script

    // Process Markdown to HTML
    let mmd = MultiMarkdown.create();
    let html = mmd.render(draft.content);
    
    // Wrap raw MMD output with HTML template with styles to set base fonts.
    let template = "<html><style>body{font-family:'Avenir Next';font-size:100%;line-height: 3;}</style><body>[[content]]</body></html>"
    html = template.replace("[[content]]", html);
    
    // Set draft template which can be used by the run workflow action next
    draft.setTemplateTag("script_content", html)
  • runWorkflow

    workflowName
    Open in as PDF
    waitForResponse
    false

Options

  • After Success Default
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.