Skip to content

Commit b1794c1

Browse files
Copilotkdinevgedinakovaonlyexeptionmtsvyatkova
authored
feat: add PDF export feature to Grid components (#16324)
Co-authored-by: kdinev <[email protected]> Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: Galina Edinakova <[email protected]> Co-authored-by: onlyexeption <[email protected]> Co-authored-by: Maria Tsvyatkova <[email protected]> Co-authored-by: Radoslav Karaivanov <[email protected]> Co-authored-by: Damyan Petev <[email protected]>
1 parent 3f8d1c8 commit b1794c1

File tree

86 files changed

+5767
-206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+5767
-206
lines changed

CHANGELOG.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,51 @@ All notable changes for each version of this project will be documented in this
1616

1717
## 21.0.0
1818

19+
### New Features
20+
21+
- `IgxGrid`, `IgxTreeGrid`, `IgxHierarchicalGrid`
22+
- Added PDF export functionality to grid components. Grids can now be exported to PDF format alongside the existing Excel and CSV export options.
23+
24+
The new `IgxPdfExporterService` follows the same pattern as Excel and CSV exporters:
25+
26+
```ts
27+
import { IgxPdfExporterService, IgxPdfExporterOptions } from 'igniteui-angular';
28+
29+
constructor(private pdfExporter: IgxPdfExporterService) {}
30+
31+
exportToPdf() {
32+
const options = new IgxPdfExporterOptions('MyGridExport');
33+
options.pageOrientation = 'landscape'; // 'portrait' or 'landscape' (default: 'landscape')
34+
options.pageSize = 'a4'; // 'a3', 'a4', 'a5', 'letter', 'legal', etc.
35+
options.fontSize = 10;
36+
options.showTableBorders = true;
37+
38+
this.pdfExporter.export(this.grid, options);
39+
}
40+
```
41+
42+
The grid toolbar exporter component now includes a PDF export button:
43+
44+
```html
45+
<igx-grid-toolbar>
46+
<igx-grid-toolbar-exporter
47+
[exportPDF]="true"
48+
[exportExcel]="true"
49+
[exportCSV]="true">
50+
</igx-grid-toolbar-exporter>
51+
</igx-grid-toolbar>
52+
```
53+
54+
Key features:
55+
- **Multi-page support** with automatic page breaks
56+
- **Hierarchical visualization** for TreeGrid (with indentation) and HierarchicalGrid (with child tables)
57+
- **Multi-level column headers** (column groups) support
58+
- **Summary rows** with proper value formatting
59+
- **Text truncation** with ellipsis for long content
60+
- **Landscape orientation** by default (suitable for wide grids)
61+
- **Internationalization** support for all 19 supported languages
62+
- Respects all grid export options (ignoreFiltering, ignoreSorting, ignoreColumnsVisibility, etc.)
63+
1964
### Breaking Changes
2065

2166
#### Multiple Entry Points Support

angular.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@
305305
"budgets": [
306306
{
307307
"type": "allScript",
308-
"maximumWarning": "2.1mb",
309-
"maximumError": "2.5mb"
308+
"maximumWarning": "2.5mb",
309+
"maximumError": "3mb"
310310
},
311311
{
312312
"type": "bundle",

0 commit comments

Comments
 (0)