Skip to content
Permalink
Browse files

Loading PDFMake from CDN

  • Loading branch information...
ngdevelop-tech committed Sep 10, 2019
1 parent 09cfd47 commit d4791085d45069e15097ecff1ff72efcf1a4889a
Showing with 4 additions and 3 deletions.
  1. +2 −3 src/app/app.component.ts
  2. +2 −0 src/index.html
@@ -1,8 +1,6 @@
import { Component } from '@angular/core';
import pdfMake from 'pdfmake/build/pdfmake';
import pdfFonts from 'pdfmake/build/vfs_fonts';
import { Resume, Experience, Education, Skill } from './resume';
pdfMake.vfs = pdfFonts.pdfMake.vfs;
declare let pdfMake: any ;
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
@@ -39,6 +37,7 @@ export class AppComponent {
}

generatePdf(action = 'open') {
console.log(pdfMake);
const documentDefinition = this.getDocumentDefinition();

switch (action) {
@@ -13,6 +13,8 @@
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.9.0/css/all.min.css">
<script src='https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.59/pdfmake.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.59/vfs_fonts.js'></script>
</head>

<body>

0 comments on commit d479108

Please sign in to comment.
You can’t perform that action at this time.