Every Indian mutual fund investor can get a CAS: a PDF from CAMS or KFintech listing every folio and every transaction, locked with a password you choose when you ask for it. I wanted a portfolio view built from it, and I didn't want the PDF to touch a server. Mine or anyone's. I built Sachfolio to do that, and this is the stuff I didn't expect.

A CAS isn't a table. It's text placed at x/y positions. pdf.js gives you runs of text with coordinates, and you rebuild lines yourself. KFintech statements sometimes draw the same text twice, slightly offset, so you have to drop the twin without dropping a real repeated value. Some pages come out rotated if the user rotated them in a viewer and saved. Nothing in the PDF tells you it's a CAMS detailed statement rather than a KFintech summary; you find out from headers and markers on the first pages.

I use the legacy pdf.js build on purpose. The modern build leans on very new JavaScript. A lot of phones in India run older Android WebViews, and the people with those phones are exactly the people who'd want this.

Floats are out. Statements print units to three or four decimals and money to two. Every number goes from its printed string straight into big.js and keeps its printed scale, because the scale tells you how much rounding the registrar did:

/** Half a unit in the last printed place: the rounding a printed value can hide. */ export function halfUlp(n: Num): Big { return new Big(5).times(new Big(10).pow(-(n.scale + 1))); } 

Checks only allow the rounding the digits allow. Units × NAV never equals the printed value exactly. A percentage tolerance would hide real misreads, so the allowed gap is built from the half-units of the three printed numbers. Opening units plus every transaction has to land on the closing units exactly. When a scheme fails, it's shown as printed, marked, and left out of the totals. I'd rather show you a gap than a confident wrong number.

Privacy is a test, not a sentence on the home page. The CSP is deny-by-default with connect-src 'self' and Trusted Types; the pdf.js worker can't connect anywhere. A Playwright suite records every request across page, worker and service worker, and fails the build if anything goes to another origin, if a request changes depending on which PDF was opened, or if anything new happens after "Clear everything".

Where it stops. MF Central statements and scans fail with a clear error. For NSDL and CDSL statements I read mutual fund units and ETFs and list shares and bonds as not read. Tax output is capital gains per lot with the rule that made it short or long term, and the Schedule 112A figures. No tax amount, nothing about what to sell.

If you're a developer: the same reader is on npm as @sachfolio/cas-reader (BUSL-1.1, beta), with output shaped like casparser, the Python library I cross-check against. There's a sandbox you can hit without a key:

curl https://api.sachfolio.com/v1/samples/dev-sample 

If your statement fails, the error code helps me. The PDF itself, please keep.