X_SCRAPE_PDF_ORIGIN_MISSING
Means
pdf() has no origin to render the route on
Typical cause
APP_URL is unset in this process and the pdf() declaration names no origin, so there is no server for the browser to load the route from
Fix
set APP_URL=https://your.app in the environment, or pdf({ origin: () => 'http://127.0.0.1:3000' }) in the declaring file