Export to pdf - exports strange format

Good day , i make a button to export my form in pdf. after some days it export in strange format


the form is based on accordion section.
i use in button:

fd.spSaved(function(result) {
  result.RedirectUrl = null;
  });
  fd.spBeforeSave(function (spForm) {
  var title=fd.field('Title').value
fd.field('IDWorkflow').value='Salvare'
    return fd.exportToPDF(title)
	return fd._vue.$nextTick();
});  


return fd.save();

and an css to export all sections:

/* show contents for all Accordion panels */
.k-pdf-export .accordion .card-block{
  display: block !important;
  height: auto !important;
}

/* gray out all navigation links */
.k-pdf-export .accordion>.card>.card-header>.nav-link {
  background-color: #fff;
  color: #55595c;
}

how to make it back export pdf?

i just remove the css and works and exports in .pdf as it was
i think i find problem. The problem is in file title when in title there is an dot "." it gives some strange format..

now appear another problem .. i put in button

fd.spSaved(function(result) {
  result.RedirectUrl = null;
  });
  fd.spBeforeSave(function (spForm) {
  // fd.container('Accordion1').$children[0].open = true;
    // fd.container('Accordion1').$children[1].open = false;
  var title='Export adresarea NR '+fd.field('ID').value
fd.field('IDWorkflow').value='Salvare'
    return fd.exportToPDF(title)
	return fd._vue.$nextTick();
});  


return fd.save();

It begin to export 2 the same pdf at one click . ho to make only one ?
i need to export only 0 accordion - may it is the problem ?

Hello @ixxxl,

Using your code, every time a user clicks the button a new spBeforeSave() function is added. This way the form exports multiple times.

To export form to PDF on button click, you can use this code:

fd.spSaved(function(result) {
  result.RedirectUrl = null;
  });
 var title='Export adresarea NR '+fd.field('ID').value 
fd.container('Accordion1').$children[0].open = true;
fd.container('Accordion1').$children[1].open = false;
fd.exportToPDF(title)

return fd.save();
1 Like

@mnikitina
Thank you!!

1 Like