#pdf 5 articles
- DecompressionStream throws away the whole result when bytes follow the compressed datagotchas / spfxInflating a PDF FlateDecode stream in the browser fails completely because a line break sits between the data and endstream; trim trailing CR/LF and read chunk by chunk, keeping what arrived before the error
- pdf-parse and pdfjs-dist cannot share a Node process — "bad XRef entry" on classic PDFsgotchas / azure-functionsLoading pdfjs-dist breaks pdf-parse's bundled pdf.js 1.10 ("bad XRef entry"), but only for classic xref-table PDFs and from the second request on — one PDF library per process; plus: load code under test with the…
- SharePoint's built-in PDF conversion endpoint works only with a plain fetch — auth headers break the redirectgotchas / rest-api_api/v2.0/drives/…/content?format=pdf converts Office files server-side with no Graph consent, but auth-decorating clients break its 302 to *.svc.ms; resolve the drive explicitly and guard on Content-Type
- What each format costs the model: tokens for the same content as .md, .docx, .pdf and a SharePoint pageguidesReal numbers: the same article as .md/.docx/.pdf/a SharePoint page — why extraction, not format, drives the token bill; plus a CZ-vs-EN language tax and a reproducible harness
- Word's PDF export silently substitutes your fonts — print to PDF insteadgotchas / toolingExportAsFixedFormat lays the text out in Calibri while Word still lists and embeds the font; print to PDF instead, install static (not variable) instances, and verify via the name table inside the embedded FontFile2