Как добавить две строки в exporterPdfHeader Угловая сетка - PullRequest
0 голосов
/ 14 марта 2019

Я использую Angular UI Grid, и я попытался показать заголовок с двумя строками в верхней части документа PDF, который экспортируется.

exporterPdfHeader: function (currentPage, pageCount) {
                return [{
                    margin: [25, 10, 30, 50],
                    alignment: 'center',
                    rows:[2],
                    columns: [
                        //{
                        //    image: 'data:image/jpg;base64,/9j/4AAQSkZJRgABAQEBLAEsAAD/4QTVRXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUAAAABAAAAYgEbAAUAAAABAAAAagEoAAMAAAABAAIAAAExAAIAAAALAAAAcgEyAAIAAAAUAAAAfodpAAQAAAABAAAAkgAAALwAAAEsAAAAAQAAASwAAAABR0lNUCAyLjQuMgAAMjAwODowODoyOCAxODozMDowNQAAA6ABAAMAAAAB//8AAKACAAQAAAABAAAAiaADAAQAAAABAAAAKAAAAAAABgEDAAMAAAABAAYAAAEaAAUAAAABAAABCgEbAAUAAAABAAABEgEoAAMAAAABAAIAAAIBAAQAAAABAAABGgICAAQAAAABAAADswAAAAAAAABIAAAAAQAAAEgAAAAB/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAALACgDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2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JUW+0oWECgjH6Zey41bxRh5rYBZBRpkY2LKJEiN1mDIqYg+OiX6ObPlm5KRpnvRo1NGAr7qphuw7eUrvZ4WPt3XAZdTps+Dvsh5W7eanhkQbU9H+3XL0ebt58Byp02jB3z4h5Xdta8jsQdtef9X7d089fPwBTptGDvsh5XcuW/hsQdnb/x1Svm4Dj12jB3zYh5XU3pTfY5EHb8d+b+W/PgJp02jB6m++IeV1a8/wDGxBy3rv5n16K//bb8Addowd3+6Jlf2bf22IPRTn/fuvn4CK9Nower/uh5Xef/ABkQU57bU5/butdq7c/x4A67Rg7v90PK/t7fDYgpy58+T67f8uAmvTaMHdvuh5XVr6fDYhpTtrtv+vVa7c+fL8OAjrtGD2/3RMrq7U5fpkQc/Rv+vO1Nv57f61Ceu04PbfdDyu83LwyIOVN/+uu2lOAOu0YO86fkh5XeenI7EP8A2+3W23AHXaMHdqbYiZXdvPc5EFK037a8n1tWu9fwrwHjE29KeyDz1aB/GDSBwZn8zkrKRMy1ysjuS1BXlCLyCuDeVNuZuobQGWEAgsEywl4gC2vqqelIwllDI4ZiyytKA/3Qj0ngdKXEIRlvhSS3Xk5Ni8BJmSL2TDAiiSEc9Sd5VBYKEsmAgDyq22CQMj2WmRqbnVU6fN20tDMWBWA7X8//AJf9eA//2Q==',
                        //    width: 90
                        //},
                        //{
                        //    text: { text: 'Task Status List', fontSize: 15, bold: true, alignment: 'center' },
                        //    width: 550
                        //},
                        {
                            row:0,
                            margin: [25, 10, 30, 50],
                            table: {
                                widths: ['*', '*', '*'],
                                body: [
                                    //['<tr><td> January</td><td>$100</td></tr><tr><td>February</td><td>$80</td></tr>'],
                                    ['District #: 2 Route #: 2 Week Ending Date: 2']//,
                                   // ['District #: 2 Route #: 2 Week Ending Date: 2']
                                ]
                            }
                        },
                        {
                            row: 1,
                            margin: [25, 10, 30, 50],
                            table: {
                                widths: ['*', '*', '*'],
                                body: [
                                    //['<tr><td> January</td><td>$100</td></tr><tr><td>February</td><td>$80</td></tr>'],
                                    ['District #: 3 Route #: 3 Week Ending Date: 3']//,
                                    //['District #: 2 Route #: 2 Week Ending Date: 2']
                                ]
                            }
                        }
                    ]
                }];
            },

Как вы можете видеть, блоки идут параллельнозаголовок, но мне нужно это в два ряда.как я могу это сделать?

enter image description here

...