Minor node/pdf2svg.js fixes.
This commit is contained in:
parent
04390d8252
commit
6048c8a910
@ -16,6 +16,7 @@ var style = {
|
|||||||
|
|
||||||
function xmlEncode(s){
|
function xmlEncode(s){
|
||||||
var i = 0, ch;
|
var i = 0, ch;
|
||||||
|
s = String(s);
|
||||||
while (i < s.length && (ch = s[i]) !== '&' && ch !== '<' &&
|
while (i < s.length && (ch = s[i]) !== '&' && ch !== '<' &&
|
||||||
ch !== '\"' && ch !== '\n' && ch !== '\r' && ch !== '\t') {
|
ch !== '\"' && ch !== '\n' && ch !== '\r' && ch !== '\t') {
|
||||||
i++;
|
i++;
|
||||||
|
@ -14,9 +14,10 @@ global.window = global;
|
|||||||
global.navigator = { userAgent: 'node' };
|
global.navigator = { userAgent: 'node' };
|
||||||
global.PDFJS = {};
|
global.PDFJS = {};
|
||||||
|
|
||||||
|
require('./domstubs.js');
|
||||||
|
|
||||||
PDFJS.workerSrc = true;
|
PDFJS.workerSrc = true;
|
||||||
require('../../build/singlefile/build/pdf.combined.js');
|
require('../../build/singlefile/build/pdf.combined.js');
|
||||||
require('./domstubs.js');
|
|
||||||
|
|
||||||
// Loading file from file system into typed array
|
// Loading file from file system into typed array
|
||||||
var pdfPath = process.argv[2] || '../../web/compressed.tracemonkey-pldi-09.pdf';
|
var pdfPath = process.argv[2] || '../../web/compressed.tracemonkey-pldi-09.pdf';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user