Browse Source

Minor node/pdf2svg.js fixes.

Yury Delendik 11 years ago
parent
commit
6048c8a910
  1. 1
      examples/node/domstubs.js
  2. 3
      examples/node/pdf2svg.js

1
examples/node/domstubs.js

@ -16,6 +16,7 @@ var style = { @@ -16,6 +16,7 @@ var style = {
function xmlEncode(s){
var i = 0, ch;
s = String(s);
while (i < s.length && (ch = s[i]) !== '&' && ch !== '<' &&
ch !== '\"' && ch !== '\n' && ch !== '\r' && ch !== '\t') {
i++;

3
examples/node/pdf2svg.js

@ -14,9 +14,10 @@ global.window = global; @@ -14,9 +14,10 @@ global.window = global;
global.navigator = { userAgent: 'node' };
global.PDFJS = {};
require('./domstubs.js');
PDFJS.workerSrc = true;
require('../../build/singlefile/build/pdf.combined.js');
require('./domstubs.js');
// Loading file from file system into typed array
var pdfPath = process.argv[2] || '../../web/compressed.tracemonkey-pldi-09.pdf';

Loading…
Cancel
Save