Commit 0ae7d190 authored by Myroslava Stavnycha's avatar Myroslava Stavnycha
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 ca998e24
......@@ -74,7 +74,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