How to place 2 images in the PDF header jquery datatable

How to place 2 images in the PDF header jquery datatable

darioxlzdarioxlz Posts: 2Questions: 2Answers: 0

I'm trying export a table to PDF, I've been using it but with only one image at the beginning of the PDF, now I want to place two images at the beginning of the PDF, one on the left, one on the right, how can I do? So far I only have this, but the images are out of alignmen

`
customize: function(doc) {
doc.defaultStyle.fontSize = 13;
doc.defaultStyle.alignment = 'center';

doc.content.splice( 1, 0, {
  margin: [ 0, 0, 0, 0 ],
  alignment: 'left',
  image: 'data:image/png;base64--------------',
  width: 125,
  height: 75
} );

doc.content.splice( 1, 0, {
  margin: [ 0, 0, 0, 0 ],
  alignment: 'right',
  image: 'data:image/png;base64--------------',
  width: 125,
  height: 75
} );

}
`

I want them to be aligned, what changes should I make?

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @darioxlz ,

    I don't know the answer, I've only seen a single image used, but if you can't work it out, you could just make a new image with both those images in it...

    Cheers,

    Colin

This discussion has been closed.