The Boring Cat

HTML to PDF PCF Control, Canvas App Edition
Creator: Harllens George de la Cruz, The Boring Cat, https://theboringcat.com/

Section 1, What is it

A React PCF control for Canvas apps that receives trusted HTML, renders an A4-ready preview, and allows in-browser print plus direct PDF download.

Section 2, The Problem

Teams need stable, branded documents from dynamic app data. Standard export paths can lose fidelity with complex tables, custom CSS, and embedded base64 images.

Section 3, The Solution

  • Accepts an HTML string through a control input property.
  • Shows a one-page, print-ready document preview in the app.
  • Supports one-click Print and Download PDF actions.
  • Supports external JSON trigger commands from Canvas buttons.
  • Exposes PDF outputs ready for Power Automate upload flows.

Section 4, Most relevant properties, triggers, outputs

Key properties
  • html, renderMode, previewHeight
  • showPrintButton, showDownloadButton
  • downloadFileName, additionalCss
Trigger payload
  • actionCommand JSON, for example {'id':'GUID','action':'print'}
  • Download command uses {'id':'GUID','action':'download'}
Outputs for Canvas and Flow
  • lastCommandAck, pdfStatus
  • pdfFileName, pdfBase64
  • Flow conversion: base64ToBinary(last(split(...,',')))