want to set off centered content in pdf export
want to set off centered content in pdf export
- I am trying to set off-centered image and heading off pdf. When I am trying to set with below code. it does not work for me.
extend: 'pdfHtml5',
text: 'PDF',
titleAttr: 'PDF',
title: 'Cleaning Report',
customize: function (doc) {
doc.pageMargins = [80, 10, 0, 10];
doc.content.splice(1, 0,
{
image: 'data:image/png;base64,iVBORC',
fit: [75, 100],
margin: [130, 0, 0, 8],//LTRB
}
);
var fElemt = doc.content[0];
doc.content[0] = doc.content[1];
doc.content[1] = fElemt;
doc.content[0].margin = [185, 15, 0, 8]; //For logo
doc.content[1].margin = [5, 0, 0, 10]; //For report namessss}
Answers
You would need to refer to the pdfmake documentation for details on how to customise the PDF with their API.
Allan