Retool Mobile β€” How to generate a PDF from HTML offline?

Hi Retool Community!

i need some assistance with my mobile app.
My goal: In a cloud hosted Retool Mobile app, I need to generate a PDF from HTML that the user can print/share while completely offline. The HTML is a multi-section service report (tables, signatures, etc.) which shall be filled with values from several components.

What I’ve tried:

  1. html2pdf.js / html2canvas inside a Mobile JS query β†’ crashes with

    Failed to read a named property 'document' from 'Window': Blocked a frame with origin "null" from accessing a cross-origin frame.
    
    
  2. dom-to-image-more + jsPDF in a JS query β†’ same error as above.

  3. PDF Exporter resource works online, but appears server-side, so not viable offline. I also hit:

    Markdown document exceeded maximum length
    

Is there a supported on-device way to convert HTML β†’ PDF in Retool Mobile (avoiding the sandbox β€œorigin null” issue in JS queries)? Maybe i am even on the wrong track and just didnt configure it correctly. I am also open to any other ways to generate a PDF from Component values.

Any help would be greatly appreciated!