1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 10:08:06 +02:00

Replace deprecated constructor with

This commit is contained in:
youngroz 2018-06-11 20:41:56 -07:00
parent 2030d1718f
commit 09359efca0
2 changed files with 2 additions and 2 deletions

View file

@ -62,7 +62,7 @@ function runTtx(ttxResourcesHome, fontPath, registerOnCancel, callback) {
exports.translateFont = function translateFont(content, registerOnCancel,
callback) {
var buffer = new Buffer(content, 'base64');
var buffer = Buffer.from(content, 'base64');
var taskId = (nextTTXTaskId++).toString();
var fontPath = path.join(ttxResourcesHome, taskId + '.otf');
var resultPath = path.join(ttxResourcesHome, taskId + '.ttx');