Skip to content

Commit

Permalink
Merge pull request #39 from lbhmygod/pr/fontdataurl-fix
Browse files Browse the repository at this point in the history
Fix fallback font issue
  • Loading branch information
dichovsky committed Nov 28, 2023
2 parents 3a3376a + 1f5e14e commit b1dbd67
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/props.to.pdf.doc.init.params.ts
Expand Up @@ -2,11 +2,12 @@ import * as pdfApiTypes from 'pdfjs-dist/types/src/display/api';
import { PDF_TO_PNG_OPTIONS_DEFAULTS } from './const';
import { PdfToPngOptions } from './types/pdf.to.png.options';
import { VerbosityLevel } from './types/verbosity.level';
import { join } from "path";

export function propsToPdfDocInitParams(props?: PdfToPngOptions): pdfApiTypes.DocumentInitParameters {
const cMapUrl = '../node_modules/pdfjs-dist/cmaps/';
const cMapUrl = join(__dirname,'../../../node_modules/pdfjs-dist/cmaps/');
const cMapPacked = true;
const standardFontDataUrl = '../node_modules/pdfjs-dist/standard_fonts/';
const standardFontDataUrl = join(__dirname, '../../../node_modules/pdfjs-dist/standard_fonts/');
const pdfDocInitParams: pdfApiTypes.DocumentInitParameters = {
cMapUrl,
cMapPacked,
Expand Down

0 comments on commit b1dbd67

Please sign in to comment.