From de844a882695e6294ddc24b06f4817cc5fad2a4f Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Tue, 16 Sep 2014 09:24:48 -0500 Subject: [PATCH] Removes examples from jsbin.com --- README.md | 4 +- examples/learning/helloworld.html | 77 +++++++++++++++++ examples/learning/helloworld.pdf | 68 +++++++++++++++ examples/learning/prevnext.html | 139 ++++++++++++++++++++++++++++++ make.js | 2 + 5 files changed, 288 insertions(+), 2 deletions(-) create mode 100644 examples/learning/helloworld.html create mode 100644 examples/learning/helloworld.pdf create mode 100644 examples/learning/prevnext.html diff --git a/README.md b/README.md index ce6c55034..a2fd2e56a 100644 --- a/README.md +++ b/README.md @@ -89,8 +89,8 @@ should be minified for production. You can play with the PDF.js API directly from your browser through the live demos below: -+ Hello world: http://jsbin.com/pdfjs-helloworld-v2/9612/edit#html,live -+ Simple reader with prev/next page controls: http://jsbin.com/pdfjs-prevnext-v2/6865/edit#html,live ++ [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) The repo contains a hello world example that you can run locally: diff --git a/examples/learning/helloworld.html b/examples/learning/helloworld.html new file mode 100644 index 000000000..b34474635 --- /dev/null +++ b/examples/learning/helloworld.html @@ -0,0 +1,77 @@ + + + + + 'Hello, world!' example + + + +

'Hello, world!' example

+ + + + + + + + + + +
+

JavaScript code:

+

+
+
+
diff --git a/examples/learning/helloworld.pdf b/examples/learning/helloworld.pdf
new file mode 100644
index 000000000..d98b4e1db
--- /dev/null
+++ b/examples/learning/helloworld.pdf
@@ -0,0 +1,68 @@
+%PDF-1.7
+
+1 0 obj  % entry point
+<<
+  /Type /Catalog
+  /Pages 2 0 R
+>>
+endobj
+
+2 0 obj
+<<
+  /Type /Pages
+  /MediaBox [ 0 0 200 200 ]
+  /Count 1
+  /Kids [ 3 0 R ]
+>>
+endobj
+
+3 0 obj
+<<
+  /Type /Page
+  /Parent 2 0 R
+  /Resources <<
+    /Font <<
+      /F1 4 0 R 
+    >>
+  >>
+  /Contents 5 0 R
+>>
+endobj
+
+4 0 obj
+<<
+  /Type /Font
+  /Subtype /Type1
+  /BaseFont /Times-Roman
+>>
+endobj
+
+5 0 obj  % page content
+<<
+  /Length 44
+>>
+stream
+BT
+70 50 TD
+/F1 12 Tf
+(Hello, world!) Tj
+ET
+endstream
+endobj
+
+xref
+0 6
+0000000000 65535 f 
+0000000010 00000 n 
+0000000079 00000 n 
+0000000173 00000 n 
+0000000301 00000 n 
+0000000380 00000 n 
+trailer
+<<
+  /Size 6
+  /Root 1 0 R
+>>
+startxref
+492
+%%EOF
\ No newline at end of file
diff --git a/examples/learning/prevnext.html b/examples/learning/prevnext.html
new file mode 100644
index 000000000..42c1f1b81
--- /dev/null
+++ b/examples/learning/prevnext.html
@@ -0,0 +1,139 @@
+
+
+
+  
+  Previous/Next example
+
+
+
+

'Previous/Next' example

+ +
+ + +     + Page: / +
+ +
+ +
+ + + + + + + + + + diff --git a/make.js b/make.js index f923bc625..002d4de16 100644 --- a/make.js +++ b/make.js @@ -184,6 +184,7 @@ target.web = function() { mkdir('-p', GH_PAGES_DIR + EXTENSION_SRC_DIR + '/chromium'); mkdir('-p', GH_PAGES_DIR + EXTENSION_SRC_DIR + '/b2g'); mkdir('-p', GH_PAGES_DIR + '/api/draft/'); + mkdir('-p', GH_PAGES_DIR + '/examples/'); cp('-R', GENERIC_DIR + '/*', GH_PAGES_DIR); cp(FIREFOX_BUILD_DIR + '/*.xpi', FIREFOX_BUILD_DIR + '/*.rdf', @@ -191,6 +192,7 @@ 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', B2G_BUILD_DIR, GH_PAGES_DIR + EXTENSION_SRC_DIR + 'b2g/'); cp('-R', JSDOC_DIR + '/*', GH_PAGES_DIR + '/api/draft/');