parent
75d2ac3c5f
commit
e1ec193a4f
@ -2,18 +2,16 @@ import axios from 'axios';
|
|||||||
import bwipjs from "bwip-js";
|
import bwipjs from "bwip-js";
|
||||||
import cheerio from "cheerio";
|
import cheerio from "cheerio";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import handlebars from 'handlebars';
|
import Handlebars from 'handlebars';
|
||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import Backend from 'i18next-fs-backend';
|
import Backend from 'i18next-fs-backend';
|
||||||
import mime from "mime-types";
|
import mime from "mime-types";
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { PDFDocument } from 'pdf-lib';
|
import { PDFDocument } from 'pdf-lib';
|
||||||
import promisedHandlebars from "promised-handlebars";
|
|
||||||
import puppeteer from "puppeteer";
|
import puppeteer from "puppeteer";
|
||||||
import { Runner } from './models/Runner';
|
import { Runner } from './models/Runner';
|
||||||
import { RunnerGroup } from './models/RunnerGroup';
|
import { RunnerGroup } from './models/RunnerGroup';
|
||||||
|
|
||||||
const Handlebars = promisedHandlebars(handlebars);
|
|
||||||
/**
|
/**
|
||||||
* This class is responsible for all things pdf creation.
|
* This class is responsible for all things pdf creation.
|
||||||
* This uses the html templates from src/templates.
|
* This uses the html templates from src/templates.
|
||||||
@ -88,6 +86,7 @@ export class PdfCreator {
|
|||||||
await Handlebars.registerHelper('--bc',
|
await Handlebars.registerHelper('--bc',
|
||||||
function (str) {
|
function (str) {
|
||||||
//TODO: Fix the async behaviour
|
//TODO: Fix the async behaviour
|
||||||
|
return "data:image"
|
||||||
return PdfCreator.generateBarcode("code39", str.toString());
|
return PdfCreator.generateBarcode("code39", str.toString());
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user