How to use the pdfmake/build/vfs_fonts.js.pdfMake function in pdfmake

To help you get started, we’ve selected a few pdfmake examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github HL7-DaVinci / dtr / src / components / QuestionnaireForm / QuestionnaireForm.jsx View on Github external
generateAndStoreDocumentReference(questionnaireResponse, dataBundle) {
        var pdfMake = require('pdfmake/build/pdfmake.js');
        var pdfFonts = require('pdfmake/build/vfs_fonts.js');
        pdfMake.vfs = pdfFonts.pdfMake.vfs;

        var docDefinition = {
            content: [
                {
                    text: 'QuestionnaireResponse: ' + questionnaireResponse.id + ' (' + questionnaireResponse.authored + ')\n',
                    style: 'header'
                },
                {
                    text: JSON.stringify(questionnaireResponse, undefined, 4),
                    style: 'body'
                }
            ],
            styles: {
                header: {
                    fontSize: 13,
                    bold: true
github IndomaximTechID / storaji-ui / src / app / main / orders / report / report.component.ts View on Github external
import { Component, OnInit } from '@angular/core';
import { OrdersService } from '../../../core/services/orders.service';
import { Order } from '../../../core/classes/order';
import { TranslateService } from '@ngx-translate/core';
import { isArray } from 'lodash';
import * as pdfMake from 'pdfmake/build/pdfmake.js';
import * as pdfFonts from 'pdfmake/build/vfs_fonts.js';
import { UtilsService } from '../../../shared/services/utils.service';
pdfMake.vfs = pdfFonts.pdfMake.vfs;

declare var numeral: any;
@Component({
  selector: 'storaji-orders-report',
  templateUrl: './report.component.html',
  styles: []
})
export class ReportComponent implements OnInit {
  orders: Order[];
  currency = numeral();

  constructor(
    private _ordersService: OrdersService,
    public translate: TranslateService,
    private utils: UtilsService
  ) { }
github juliandavidmr / TrelloResume / utils / report.js View on Github external
var pdfMake = require('pdfmake/build/pdfmake.js');
var pdfFonts = require('pdfmake/build/vfs_fonts.js');
pdfMake.vfs = pdfFonts.pdfMake.vfs;

import * as Trello from './trello'

var content = [];

/**
 * initialize content
 * @param {string} name 
 */
function initialize(name) {
  content = [{
    text: name,
    style: 'header',
    alignment: 'center'
  }]
}
github IndomaximTechID / storaji-ui / src / app / main / products / report / report.component.ts View on Github external
import { Component, OnInit, OnDestroy } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { Subscription } from 'rxjs/Subscription';
import * as pdfMake from 'pdfmake/build/pdfmake.js';
import * as pdfFonts from 'pdfmake/build/vfs_fonts.js';
import { isArray } from 'lodash';
import { ProductsService } from '../../../core/services/products.service';
import { Product } from '../../../core/classes/product';
import { UtilsService } from '../../../shared/services/utils.service';


pdfMake.vfs = pdfFonts.pdfMake.vfs;

declare var numeral: any;
@Component({
  selector: 'storaji-products-report',
  templateUrl: './report.component.html',
  styles: []
})
export class ReportComponent implements OnInit, OnDestroy {
  products: Product[];
  currency = numeral();

  private _sub: Subscription = undefined;

  constructor(
    private _productService: ProductsService,
    public translate: TranslateService,
github IndomaximTechID / storaji-ui / src / app / main / orders / overview / overview.component.ts View on Github external
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, ParamMap } from '@angular/router';
import { Location } from '@angular/common';
import 'rxjs/add/operator/switchMap';
import { TranslateService } from '@ngx-translate/core';
import * as pdfMake from 'pdfmake/build/pdfmake.js';
import * as pdfFonts from 'pdfmake/build/vfs_fonts.js';
import { isObject } from 'lodash';
import { OrdersService } from '../../../core/services/orders.service';
import { Order } from '../../../core/classes/order';
import { UtilsService } from '../../../shared/services/utils.service';
pdfMake.vfs = pdfFonts.pdfMake.vfs;

declare var numeral: any;
@Component({
  selector: 'storaji-orders-overview',
  templateUrl: './overview.component.html',
  styles: []
})
export class OverviewComponent implements OnInit {
  order: Order;
  currency = numeral();

  constructor(
    private routes: ActivatedRoute,
    private location: Location,
    private _ordersService: OrdersService,
    public translate: TranslateService,