pdf image is not visible properly
pdf image is not visible properly
![krishanu_debnath](https://secure.gravatar.com/avatar/268f258dad94aa8546d79be026fe9c76/?default=https%3A%2F%2Fvanillicon.com%2F268f258dad94aa8546d79be026fe9c76_200.png&rating=g&size=120)
1) I used below code, but image is not display properly. Please help me to find proper way.
customize: function(doc) {
doc['header']=(function() {
return {
columns: [
{
image: base64,//image based64 string
width: 50
}
],
margin: 20
};
});
}
2) Want to display table into center of the page.
Replies
Question 1 is resolved, Now 2 is remaining. Please give me some solution.
See if this thread helps you to center the table in the PDF export.
Kevin
@kthorngren
tried below code. but not worked
customize: function (doc){
doc.content[2].table.widths = ['auto', 'auto', 'auto', 'auto', 'auto', 'auto', '*'];
alert(eTable.page.info().recordsDisplay);
for (var i = 1; i < eTable.page.info().recordsDisplay+1; i++) {
doc.content[2].table.body[i][2].alignment = 'center';
doc.content[2].table.body[i][4].alignment = 'center';
}
}
Probably best to ask the pdfmake folks how to do it in their library. You could also try updating to the latest version of pdfmake - our download builder isn't currently up to date in that regard.
Allan