taxtank-core 2.0.53 → 2.0.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -20612,19 +20612,22 @@ applyPlugin(jsPDF);
20612
20612
  class JsPdf extends jsPDF {
20613
20613
  }
20614
20614
 
20615
- /**
20616
- * Settings for generated PDF file from DOM elements
20617
- */
20615
+ // универсально-быстрые для Win11 + Chrome 142 и Hi-DPR экранов
20618
20616
  const FILE_SETTINGS$1 = {
20619
20617
  margin: 10,
20620
20618
  filename: 'export.pdf',
20619
+ image: { type: 'jpeg', quality: 0.95 },
20621
20620
  html2canvas: {
20622
- scale: 2,
20621
+ windowWidth: 1200,
20622
+ windowHeight: 900,
20623
+ scale: 1.25,
20624
+ foreignObjectRendering: true,
20625
+ letterRendering: false,
20623
20626
  useCORS: true,
20627
+ backgroundColor: '#fff',
20628
+ logging: true
20624
20629
  },
20625
- pagebreak: {
20626
- mode: 'avoid-all'
20627
- },
20630
+ pagebreak: { mode: 'avoid-all' },
20628
20631
  jsPDF: {
20629
20632
  unit: 'mm',
20630
20633
  format: 'a3',
@@ -20652,18 +20655,27 @@ class PdfFromDomElementService {
20652
20655
  elements.forEach((element) => {
20653
20656
  htmlWrapper.append(element.cloneNode(true));
20654
20657
  });
20658
+ console.log(htmlWrapper);
20655
20659
  // Set PDF options, save file and return result as Observable
20656
- return html2pdf().from(htmlWrapper).set(options);
20660
+ return html2pdf().from(htmlWrapper).set(options).then(() => {
20661
+ });
20657
20662
  }
20658
20663
  download(elements, fileSettings) {
20664
+ const start = new Date();
20659
20665
  return from(this.init(elements, fileSettings)
20660
20666
  .save()
20661
- .then());
20667
+ .then(() => {
20668
+ console.log((new Date().getTime() - start.getTime()) / 1000);
20669
+ }));
20662
20670
  }
20663
20671
  export(elements, filename = FILE_SETTINGS$1.filename) {
20672
+ const start = new Date();
20664
20673
  return from(this.init(elements)
20665
20674
  .outputPdf('blob')
20666
- .then((blob) => new File([blob], filename, { type: 'application/pdf' })));
20675
+ .then((blob) => {
20676
+ console.log((new Date().getTime() - start.getTime()) / 1000);
20677
+ return new File([blob], filename, { type: 'application/pdf' });
20678
+ }));
20667
20679
  }
20668
20680
  // fix html2canvas-pro problem with vertical alignment: https://github.com/yorickshan/html2canvas-pro/issues/92
20669
20681
  injectExportStyles(element) {