diff --git a/lib/reader.js b/lib/reader.js index 8acb4e6..36b2f10 100644 --- a/lib/reader.js +++ b/lib/reader.js @@ -50,7 +50,7 @@ PDFJS.FontLoader.bind = function nodeFontLoaderBind(pdf, fonts, callback) { } var fontName = font.loadedName; - var fontFile = 'temp/' + pdf._idx + '_' + fontName + '.ttf'; + var fontFile = __dirname + '/../temp/' + pdf._idx + '_' + fontName + '.ttf'; // Temporary hack for loading the font. Write it to file such that a font // object can get created from it and use it on the context.