Direct export as PDF from WPRichText

  • Hello,

    I would like to load a document into a WPRichText and save it into PDF. It is working if I'm exporting a WPRichText to PDF with the visual component, but I would like to do it with no visual component so that the opening of the document is hidden.

    The code below gives me a ERangeError. Do I need to do something with the WPRichText before exporting to PDF ?