Open juliekirwin opened 9 years ago
+1 - Any News ?
@Dejab666 I ended up setting dontbreakrows: true
and made my image size a static width and divided the remaining page width between the rest of the columns. This seemed to fix the issue for me.
table: {
headerRows: 1,
dontBreakRows:true,
widths: $scope.colWidths,
body: $scope.body
}
For the page widths I had to get a little creative. Here is the array I used to select paper size.... I have to admit it was a little brute force / hacky, but I needed to get it done.
$scope.formats = [{ID : 'Executive', width: 522, height: 756}, {ID : 'Folio', width: 612, height: 936},
{ ID: 'Legal', width: 612, height: 1008 }, { ID: 'Letter', width: 612, height: 792 },
{ ID: 'Tabloid', width: 792, height: 1224 }, { ID: 'A3', width: 842, height: 1190 },
{ ID : 'A4', width: 595, height: 842 }, {ID : 'A5', width: 420, height: 595 },
{ ID: 'B4', width: 709, height: 1001 }, { ID: 'B5', width: 498, height: 709 }];
Hello.
I'm currently working with PDF make to generate a table that has multiple images in it. I've noticed however table
widths: "*"
breaks out of the page margins when an image is involved. I've created this snippet of code in the pdfMake playground to show the issue.Is there a way I can achieve auto width for all of my columns expect the image column? The number of columns per table is dynamic as well, so I have also tried
{text: "MY TEXT", width: '*'}
for all the non image columns and{image: base64 img , width: 100}
for the column with the image.. this did not work for me either. Is this a bug or is there another way?Thanks!