From fd4428136b6a2dffb31b88f9b6da724623c5e8c5 Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Tue, 7 Feb 2017 13:11:18 -0600 Subject: [PATCH] Moving interactive examples to jsfiddle.net --- README.md | 3 +-- docs/contents/examples/index.md | 22 ++++++++++++++++++++++ make.js | 1 - 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 988cd08cd..34775314d 100644 --- a/README.md +++ b/README.md @@ -102,8 +102,7 @@ the `pdfjs-dist` name. For more information and examples please refer to the You can play with the PDF.js API directly from your browser through the live demos below: -+ [Hello world](http://mozilla.github.io/pdf.js/examples/learning/helloworld.html) -+ [Simple reader with prev/next page controls](http://mozilla.github.io/pdf.js/examples/learning/prevnext.html) ++ [Interactive examples](http://mozilla.github.io/pdf.js/examples/index.html#interactive-examples) The repo contains a hello world example that you can run locally: diff --git a/docs/contents/examples/index.md b/docs/contents/examples/index.md index 418bc2070..f50b69ea4 100644 --- a/docs/contents/examples/index.md +++ b/docs/contents/examples/index.md @@ -61,3 +61,25 @@ var viewport = page.getViewport(1); var scale = desiredWidth / viewport.width; var scaledViewport = page.getViewport(scale); ``` + +## Interactive examples + +### Hello World with document load error handling + +The example demonstrates how promises can be used to handle errors during loading. +It also demonstrates how to wait until page loaded and rendered. + + + +### Hello World using base64 encoded PDF + +The PDF.js can accept any decoded base64 data as an array. + + + +### Previous/Next example + +The same canvas cannot be used to perform to draw two pages at the same time -- +the example demonstrate how to wait on previous operation to be complete. + + diff --git a/make.js b/make.js index 405549839..9e2afc789 100644 --- a/make.js +++ b/make.js @@ -119,7 +119,6 @@ target.web = function() { cp(CHROME_BUILD_DIR + '/*.crx', FIREFOX_BUILD_DIR + '/*.rdf', GH_PAGES_DIR + EXTENSION_SRC_DIR + 'chromium/'); cp('-R', 'test/features', GH_PAGES_DIR); - cp('-R', 'examples/learning', GH_PAGES_DIR + '/examples/'); cp('-R', JSDOC_DIR + '/*', GH_PAGES_DIR + '/api/draft/'); var wintersmith = require('wintersmith');