How to use the pdfmake/build/pdfmake.vfs 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 egovernments / egov-services / web / react-pgr-web / src / components / non-framework / tl / search / NoticeSearchResult.js View on Github external
import React, {Component} from 'react';
import {Table} from 'react-bootstrap';
import Dialog from 'material-ui/Dialog';
import {Card, CardHeader, CardText} from 'material-ui/Card';
import FlatButton from 'material-ui/FlatButton';
import {translate, epochToDate} from '../../../common/common';
import Api from '../../../../api/api';
import styles from '../../../../styles/material-ui';

import $ from 'jquery';
import 'datatables.net-buttons/js/buttons.html5.js';// HTML 5 file export
import 'datatables.net-buttons/js/buttons.flash.js';// Flash file export
import jszip from 'jszip/dist/jszip';
import pdfMake from "pdfmake/build/pdfmake";
import pdfFonts from "pdfmake/build/vfs_fonts";
pdfMake.vfs = pdfFonts.pdfMake.vfs;

export default class NoticeSearchResult extends Component{
  constructor(){
    super();
    this.state={
      open:false
    };
  }
  componentDidMount(){
    for(var k in this.props.noticeSearch){
      if(!this.props.noticeSearch[k])
        delete this.props.noticeSearch[k];
    }
    this.getSearchNotice(this.props.searchParams);
  }
  componentWillUpdate() {
github egovernments / egov-services / web / ui-web-app / src / development / pgr / lib / master / serviceType / viewOrUpdateServiceType.js View on Github external
import React, {Component} from 'react';
import {connect} from 'react-redux';
import {Grid, Row, Col, Table} from 'react-bootstrap';
import {Card, CardHeader, CardText} from 'material-ui/Card';
import {Api, translate} from 'egov-common-utility';
import styles from '../../styles/material-ui';

import $ from 'jquery';
import 'datatables.net-buttons/js/buttons.html5.js';// HTML 5 file export
import 'datatables.net-buttons/js/buttons.flash.js';// Flash file export
import jszip from 'jszip/dist/jszip';
import pdfMake from "pdfmake/build/pdfmake";
import pdfFonts from "pdfmake/build/vfs_fonts";
pdfMake.vfs = pdfFonts.pdfMake.vfs;

var flag = 0;
var _this;

const getNameById = function(object, id, property = "") {
  if (id == "" || id == null) {
        return "";
    }
    for (var i = 0; i < object.length; i++) {
        if (property == "") {
            if (object[i].id == id) {
                return object[i].name;
            }
        } else {
            if (object[i].hasOwnProperty(property)) {
                if (object[i].id == id) {
github egovernments / egov-services / web / react-pgr-web-v2 / src / components / contents / pgr / master / escalation / bulkEscalationGeneration.js View on Github external
import FlatButton from 'material-ui/FlatButton';
import AutoComplete from 'material-ui/AutoComplete';
import RaisedButton from 'material-ui/RaisedButton';
import Chip from 'material-ui/Chip';
import DataTable from '../../../../common/Table';
import Api from '../../../../../api/api';
import styles from '../../../../../styles/material-ui';
import {translate} from '../../../../common/common';

import $ from 'jquery';
import 'datatables.net-buttons/js/buttons.html5.js';// HTML 5 file export
import 'datatables.net-buttons/js/buttons.flash.js';// Flash file export
import jszip from 'jszip/dist/jszip';
import pdfMake from "pdfmake/build/pdfmake";
import pdfFonts from "pdfmake/build/vfs_fonts";
pdfMake.vfs = pdfFonts.pdfMake.vfs;

var flag = 0;

const style = {
  chip: {
    margin: 4,
    cursor:'pointer'
  },
  wrapper: {
    display: 'flex',
    flexWrap: 'wrap',
  },
};

const getNameById = function(object, id, property = "") {
  if (id == "" || id == null) {
github egovernments / egov-services / web / react-pgr-web / src / components / contents / pgr / master / escalation / defineEscalation.js View on Github external
import SelectField from 'material-ui/SelectField';
import MenuItem from 'material-ui/MenuItem';
import AutoComplete from 'material-ui/AutoComplete';
import RaisedButton from 'material-ui/RaisedButton';
import DataTable from '../../../../common/Table';
import Api from '../../../../../api/api';
import styles from '../../../../../styles/material-ui';
import {translate} from '../../../../common/common';

import $ from 'jquery';
import 'datatables.net-buttons/js/buttons.html5.js';// HTML 5 file export
import 'datatables.net-buttons/js/buttons.flash.js';// Flash file export
import jszip from 'jszip/dist/jszip';
import pdfMake from "pdfmake/build/pdfmake";
import pdfFonts from "pdfmake/build/vfs_fonts";
pdfMake.vfs = pdfFonts.pdfMake.vfs;

var flag = 0;

const getNameById = function(object, id, property = "") {


  if (id == "" || id == null) {
        return "";
    }
    for (var i = 0; i < object.length; i++) {
        if (property == "") {
            if (object[i].id == id) {
                return object[i].name;
            }
        } else {
            if (object[i].hasOwnProperty(property)) {
github egovernments / egov-services / web / react-pgr-web-v2 / src / components / contents / pgr / master / serviceGroup / viewEditServiceGroup.js View on Github external
import React, {Component} from 'react';
import {connect} from 'react-redux';
import {Grid, Row, Col, Table} from 'react-bootstrap';
import {Card, CardHeader, CardText} from 'material-ui/Card';
import Api from '../../../../../api/api';
import styles from '../../../../../styles/material-ui';
import {translate} from '../../../../common/common';

import $ from 'jquery';
import 'datatables.net-buttons/js/buttons.html5.js';// HTML 5 file export
import 'datatables.net-buttons/js/buttons.flash.js';// Flash file export
import jszip from 'jszip/dist/jszip';
import pdfMake from "pdfmake/build/pdfmake";
import pdfFonts from "pdfmake/build/vfs_fonts";
pdfMake.vfs = pdfFonts.pdfMake.vfs;

var flag = 0;

var _this;

class ViewEditServiceGroup extends Component {
    constructor(props) {
      super(props);
      this.state = {
        data:'',
        modify: false
      }
    }

    componentWillMount() {
    }
github egovernments / egov-services / web / ui-web-app / src / development / inventory / lib / common / components / CustomUiTable.js View on Github external
// require('datatables.net-buttons/js/buttons.colVis.js'); // Column visibility
// require('datatables.net-buttons/js/buttons.html5.js'); // HTML 5 file export
// require('datatables.net-buttons/js/buttons.flash.js'); // Flash file export
// require('datatables.net-buttons/js/buttons.print.js'); // Print view button

import $ from 'jquery';
import 'datatables.net-buttons/js/buttons.html5.js';// HTML 5 file export
import 'datatables.net-buttons/js/buttons.flash.js';// Flash file export
import jszip from 'jszip/dist/jszip';
import pdfMake from "pdfmake/build/pdfmake";
import pdfFonts from "pdfmake/build/vfs_fonts";
import 'datatables.net-buttons/js/buttons.flash.js';
import 'datatables.net-buttons-bs';


pdfMake.vfs = pdfFonts.pdfMake.vfs;

var enumWithUnderscore = [{
	propertyName: "rateType"
}]

class CustomUiTable extends Component {
	constructor(props) {
       super(props);
       this.state = {};
  }

  componentWillUnmount() {
			if($.fn.DataTable.isDataTable('#searchTable')) {
    		$('#searchTable').DataTable().destroy(true);
		  }
  }
github egovernments / egov-services / web / react-pgr-web / src / components / contents / pgr / master / escalation / bulkEscalationGeneration.js View on Github external
import FlatButton from 'material-ui/FlatButton';
import AutoComplete from 'material-ui/AutoComplete';
import RaisedButton from 'material-ui/RaisedButton';
import Chip from 'material-ui/Chip';
import DataTable from '../../../../common/Table';
import Api from '../../../../../api/api';
import styles from '../../../../../styles/material-ui';
import {translate} from '../../../../common/common';

import $ from 'jquery';
import 'datatables.net-buttons/js/buttons.html5.js';// HTML 5 file export
import 'datatables.net-buttons/js/buttons.flash.js';// Flash file export
import jszip from 'jszip/dist/jszip';
import pdfMake from "pdfmake/build/pdfmake";
import pdfFonts from "pdfmake/build/vfs_fonts";
pdfMake.vfs = pdfFonts.pdfMake.vfs;

var flag = 0;

const style = {
  chip: {
    margin: 4,
    cursor:'pointer'
  },
  wrapper: {
    display: 'flex',
    flexWrap: 'wrap',
  },
};

const getNameById = function(object, id, property = "") {
  if (id == "" || id == null) {
github voteflux / THE-APP / packages / lib / pdfs / nda / generatePdf.ts View on Github external
import { UserV1Object } from './../../types/db';

import {yourSignaturePlaceholder} from './imageUris'

import pdfMake from 'pdfmake/build/pdfmake'
import pdfFonts from "pdfmake/build/vfs_fonts"
pdfMake.vfs = pdfFonts.pdfMake.vfs

type PdfText = {
    text: string | PdfText | Array,
    bold?: boolean,
}


export const genNdaDetailsFromUser = (user: UserV1Object) => {
    return {
        fullName: [user.fname, user.mnames, user.sname].join(' '),
        fullAddr: [user.addr_street_no + ' ' + user.addr_street, user.addr_suburb, user.addr_postcode, user.addr_country].join(', ')
    }
}


export const genPdf = async (