Despite the COVID-19 outbreak, our team continues operating at full speed. We are always here to support and answer all your questions.

Feel free to reach out by filling this quick form.

Fill the form
Get Free Trial

How append customize data to pdf

Answered
mostafa asked on December 2, 2020

when doing this way the error occur:
Uncaught (in promise): Error: Supplied Data is not a valid base64-String jsPDF.convertStringToImageData
this is my code:

      let exportPivot = tabs.find(obj => obj && typeof (obj) === ‘object’ ? obj.title === ‘Export’ : null);

      let pdfItem = exportPivot.menu.find(obj => obj.args === ‘pdf’);
        pdfItem.handler = pdf;

     function pdf() {
      var params = {
        filename: `${refObject.report.title}`,
        header: `${refObject.header}`,
        footer: “”,
        showFilters: true
      };
      this.pivot.exportTo(‘pdf’, params);
     }

3 answers

Public
Mykhailo Halaida Mykhailo Halaida Flexmonster December 2, 2020

Hi Mostafa,
 
Thank you for posting your question.
 
Could you please provide us with a sample where this behavior is reproducible? This would help us understand your situation better and provide you with the most relevant information in our response.
 
Looking forward to hearing from you.
 
Best regards,
Mykhailo

Public
mostafa December 2, 2020

hello Mykhailo,
thank you for your responding, i am use that code in angular10 project.
**i wish my answers to benefit you ** 
beast regards,
Mostafa | software engineer.

Public
mostafa December 2, 2020

thanks Mykhailo, 
the code working now successfully, but i am facing new issue … the page duplicate the content when export to pdf.
many thanks, 

Please login or Register to Submit Answer