pdf.js/examples
Jonas Jenwald c355f91d2e [api-minor] Immediately release the font.data property once the font been attached to the DOM (PR 11777 follow-up)
*This patch implements https://github.com/mozilla/pdf.js/pull/11777#issuecomment-609741348*

This extends the work from PR 11773 and 11777 further, by immediately releasing the `font.data` property once the font been attached to the DOM. By not unnecessarily holding onto this data on the main-thread, we'll thus reduce the memory usage of fonts even further (especially beneficial in longer documents with composite fonts).

The new behaviour is controlled by the recently added `fontExtraProperties` API option (adding a new option just for this patch didn't seem necessary), since there's one edge-case in the SVG renderer where the `font.data` property is necessary (see the `pdf2svg` example).

Note that while the default viewer does run clean-up with an idle timeout, that timeout will be reset whenever rendering occurs *or* when scrolling happens in the viewer. In practice this means that unless the user doesn't interact with the viewer in *any* way during an extended period of time, currently set to 30 seconds, the `PDFDocumentProxy.cleanup` method will never be called and font resources will thus not be cleaned-up.
2020-04-23 13:04:57 +02:00
..
acroforms Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
browserify Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
components Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
create-react-app Add Create React App example with TypeScript and basic usage 2019-10-10 23:25:41 +02:00
image_decoders Enable auto-formatting of the entire code-base using Prettier (issue 11444) 2019-12-26 12:34:24 +01:00
learning Add direction: ltr; to the canvases used in examples/learning, to ensure correct text rendering (issue 11457) 2020-01-12 12:25:23 +01:00
mobile-viewer Enable the dot-notation ESLint rule 2020-04-17 12:24:46 +02:00
node [api-minor] Immediately release the font.data property once the font been attached to the DOM (PR 11777 follow-up) 2020-04-23 13:04:57 +02:00
svgviewer Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
text-only Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
webpack Update Prettier to version 2.0 2020-04-14 12:28:14 +02:00
.eslintrc Upgrade to eslint version 6 2019-08-24 20:21:10 +02:00