Chrome extension that exports an entire Microsoft Loop workspace as a single PDF. Microsoft doesn't give you a way to do this natively, you can only print one page at a time by hand. This automates the whole thing: it walks every page in the workspace, renders each one through Loop's own print view, captures it with Chrome's actual print engine, and stitches everything into one PDF.
No server, no accounts, nothing leaves your machine. It uses your existing Loop session for auth.
- Clone this repo (or download it as a zip and unzip it)
- Open Chrome and go to
chrome://extensions - Turn on Developer mode (toggle in the top right)
- Click Load unpacked and select the repo folder
- You should see the Loop Exporter icon show up in your toolbar
- Open your workspace at
loop.cloud.microsoftand make sure the page list is visible in the left rail - Click the extension icon and hit Scan workspace. The scan clicks through your pages once to find them all (Loop's nav has no real links, so this is the only way). Takes a few seconds
- Check the list it found, uncheck anything you don't want, then hit Export selected to PDF
- A small capture window opens and steps through each page. Leave it alone and don't minimize it. Chrome will show a "started debugging this browser" banner while it runs, that's expected
- When it's done the PDF lands in your Downloads as
Loop Export M-D-YY H:MM AM.pdf
The text in the PDF is real selectable text (not screenshots), so you can search it, copy from it, and feed it to AI tools. Tables come through cleanly too.
The short version: Loop pages are Fluid Framework documents, so there's no HTML to scrape and no file to download. The only complete rendering of a page is the live DOM. Loop does have a hidden print route (/print/<pointer>) that mounts a print-optimized view and immediately calls window.print(), which normally freezes the tab in the OS print dialog.
This extension:
- Stubs out
window.printandwindow.closeon the print route before Loop's code runs, so the page renders fully but never opens the dialog or closes itself - Waits for Loop's own "render complete" signal plus a DOM quiet period
- Fires a synthetic
beforeprintevent so Loop strips its editor chrome (the "Add cover" button etc) - Captures the page with
Page.printToPDFover the Chrome DevTools Protocol, which is the same pipeline the native print dialog uses. If that fails on your machine it falls back to a full-page screenshot of the print view - Merges everything with a bundled copy of pdf-lib and saves it to Downloads
Captures happen in a visible window because Chrome throttles rendering in background tabs and Loop's print view never finishes loading in one.
- "Could not establish connection" when scanning: reload the Loop tab after loading/reloading the extension, then scan again
- A page says "captured as image": the print engine failed on that page and it fell back to a screenshot. Looks the same but the text won't be selectable. Check the service worker console (
chrome://extensions> "service worker" link on the extension card) for[loop-exporter]log lines - Debugger attach fails: close any DevTools windows attached to the capture window. Some enterprise policies block
chrome.debuggerentirely - Scan missed nested pages: expand the collapsed sections in the rail manually and rescan
manifest.json MV3 manifest
background/
service-worker.js orchestrator: queue, capture window, retries, state
capture.js CDP printToPDF + screenshot fallback
merge.js pdf-lib merge, blob staging, download
content/
print-defuse.js stubs print()/close() on the print route
ready-signal.js render-readiness detection
enumerate.js workspace page discovery
offscreen/ blob URL staging for the download
popup/ scan > checklist > progress UI
icons/
vendor/pdf-lib.min.js bundled so Loop's CSP can't block it
index.html the original technical plan, open it in a browser