pdf image is not visible properly

pdf image is not visible properly

krishanu_debnathkrishanu_debnath Posts: 18Questions: 1Answers: 0

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

  • krishanu_debnathkrishanu_debnath Posts: 18Questions: 1Answers: 0

  • krishanu_debnathkrishanu_debnath Posts: 18Questions: 1Answers: 0

    Question 1 is resolved, Now 2 is remaining. Please give me some solution.

  • kthorngrenkthorngren Posts: 21,349Questions: 26Answers: 4,955

    See if this thread helps you to center the table in the PDF export.

    Kevin

  • krishanu_debnathkrishanu_debnath Posts: 18Questions: 1Answers: 0

    @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';
    }
    }

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin

    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

Sign In or Register to comment.