import { Component, ViewChild } from '@angular/core';
import { PDFExportComponent } from '@progress/kendo-angular-pdf-export';
import { exportImage } from '@progress/kendo-drawing';
import { saveAs } from '@progress/kendo-file-saver';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  @ViewChild('svgPrint') svgPrint: PDFExportComponent = {} as PDFExportComponent;
  @ViewChild('divPrint') divPrint: PDFExportComponent = {} as PDFExportComponent;

  public printSvg() {
    this.svgPrint.export().then((group) => {
      exportImage(group).then((data) => {
        saveAs(data, "svgScreen");
      });
    });
  }

  public printDiv() {
    this.divPrint.export().then((group) => {
      exportImage(group).then((data) => {
        saveAs(data, "divScreen");
      });
    });
  }


 constructor() {}
 
}
