Most browser-side "compress PDF" code does the same thing. It renders every page to a canvas, encodes that canvas as a JPEG, and builds a new PDF with one picture per page. It works on anything, and the file usually gets smaller. It also destroys the document: the text can no longer be selected or…
Read Full Article on DEV Community →