Commit 4b8362bf authored by Myroslava Stavnycha's avatar Myroslava Stavnycha Committed by Fred Chasen
Browse files

If local file is passed as input to pagedjs and connected to remote browser,...

If local file is passed as input to pagedjs and connected to remote browser, then pass file content to browser
parent ab50c2ab
......@@ -78,7 +78,12 @@ class Printer extends EventEmitter {
url = input;
} catch (error) {
relativePath = path.resolve(dir, input);
url = "file://" + relativePath;
if (this.browserWSEndpoint) {
html = fs.readFileSync(relativePath, 'utf-8')
} else {
url = "file://" + relativePath;
}
}
} else {
url = input.url;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment