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

Export Pdf to Serer – We can not find the parameter for server side program

Gobinath Rajamanickam asked on October 15, 2020

 Export Pdf to Serer – We can not find the parameter for server side program
 I read Documentation for ‘ExportTo’ API for save PDF to server with JSPDF object, but there is no sample or JSPPDF object reference for .Net core applications, Could you provide a sample code (PDF and HTML Server Upload) ?

1 answer

Milena Pechura Milena Pechura Flexmonster October 16, 2020

Thank you for your question.
Please kindly note that the jsPDF object is used only for PDF export using destinationType: "plain" of the exportTo params parameter. 
The "plain" value specifies that the component’s content will be returned with callbackHandler, which is used for modifying the file before export and error handling.
Taking into account your case, we suggest defining destinationType: "server" and url: 'your server'. The url value should be a link to the server-side script on your backend that will handle the pdf file. 
For HTML export, the type parameter should be changed to 'html' and the server-side script should handle the HTML files that Flexmonster sends.

var secondParam = { 
  filename : 'flexmonster.pdf', 
  destinationType : 'server', 
  url : 'your server' 
var firstParam = 'html'; // type
flexmonster.exportTo(firstParam, secondParam);

Also, we have received your email containing two questions about the export. Please note that the approach we described in this answer works for exporting from the client to the server side. If the desired component behavior is sending reports using headless browsers, please see the answer in the email.
Please let us know if it helps.
Best regards,

Please login or Register to Submit Answer