wnabil / ngx-export-as

Angular 2+ / Ionic 2+ HTML/table element to export it as JSON, XML, PNG, CSV, TXT, MS-Word, Ms-Excel, PDF
MIT License
68 stars 40 forks source link

export process just freezes #79

Closed silvinodemedeiros closed 4 years ago

silvinodemedeiros commented 4 years ago

I'm trying to export a div as PDF but I don't have success if there are too many pages. With too many pages the process just freezes on the "Starting renderer" message.

I'm using plain vanilla configuration for the ExportAsConfig

  exportAsConfig: ExportAsConfig = {
    type: 'pdf',
    elementIdOrContent: 'report-document'
  };

And this is the CSS classe for a page

.page {
  position: relative;
  width: 794px;
  height: 1121px;
  font-size: 2rem;
  margin: 0 0 0 0;
  padding: 0;
  border: 1px solid transparent;
  page-break-after: always;
}

Also I'm using the latest version, 1.4.2. I think it has something to do with the size of the element because it works if I cut some pages.

wnabil commented 4 years ago

With this package you cant simply export many pages in one pdf so if your content is too big I suggest you to use html2pdf library without this package as this one is made for simple usage