Class IgxPdfExporterOptions

このクラスのオブジェクトは PDF エクスポート処理で使用されます。

階層

Hierarchy (View Summary)

コンストラクター

プロパティ

alwaysExportHeaders: boolean = true

データがない場合にヘッダーをエクスポートするかどうかを指定します。

let alwaysExportHeaders = this.exportOptions.alwaysExportHeaders;
this.exportOptions.alwaysExportHeaders = false;

IgxExporterOptionsBase

customFont?: PdfUnicodeFont

PDF エクスポートで Unicode 文字サポート用のカスタム フォント構成。

デフォルトでは、PDF エクスポーターは組み込みの Helvetica フォントを使用しますが、これは基本的なラテン文字のみをサポートします。データにキリル文字、中国語、日本語、アラビア語、ヘブライ語、特殊記号などの非ラテン文字が含まれる場合は、必要な文字グリフを含むカスタム TrueType フォント (TTF) を指定する必要があります。

フォント データは TTF ファイル内容の Base64 エンコード文字列として提供する必要があります。 ヘッダー スタイリング用に太字バリアントを別途指定することもできます。

TTF ファイルを Base64 に変換するには、Node.js を使用できます:

const fs = require('fs');
const fontData = fs.readFileSync('path/to/font.ttf');
const base64 = fontData.toString('base64');
fs.writeFileSync('font-base64.ts', `export const MY_FONT = '${base64}';`);

または、オンラインの Base64 エンコーダー ツールを使用して TTF ファイルを変換することもできます。

単一フォントでの基本的な使用法 (通常のテキストと太字のテキストの両方に使用):

import { NOTO_SANS_REGULAR } from './fonts/noto-sans';

const options = new IgxPdfExporterOptions('Export');
options.customFont = {
name: 'NotoSans',
data: NOTO_SANS_REGULAR
};
this.pdfExporter.export(this.grid, options);

通常フォントと太字フォントの別個のバリアントの使用法:

import { NOTO_SANS_REGULAR, NOTO_SANS_BOLD } from './fonts/noto-sans';

const options = new IgxPdfExporterOptions('Export');
options.customFont = {
name: 'NotoSans',
data: NOTO_SANS_REGULAR,
bold: {
name: 'NotoSans-Bold',
data: NOTO_SANS_BOLD
}
};
this.pdfExporter.export(this.grid, options);
Unicode サポートの推奨フォント:
- Noto Sans: ほとんどの Unicode スクリプトをカバー (https://fonts.google.com/noto)
- Arial Unicode MS: 包括的な Unicode 文字サポート
- Source Han Sans: 優れた CJK (中国語日本語韓国語) サポート

IgxPdfExporterOptions

exportSummaries: boolean = true

エクスポートされたデータが提供された IgxGrid のように複数列ヘッダーを含むかどうかを指定します。

let exportSummaries = this.exportOptions.exportSummaries;
this.exportOptions.exportSummaries = true;

IgxExporterOptionsBase

fontSize: number = 10

テーブル コンテンツのフォント サイズを指定します。(デフォルトは 10)

let fontSize = this.exportOptions.fontSize;
this.exportOptions.fontSize = 12;

IgxPdfExporterOptions

freezeHeaders: boolean = false

エクスポートされたデータにフリーズされたヘッダーを含めるかどうかを指定します。

let freezeHeaders = this.exportOptions.freezeHeaders;
this.exportOptions.freezeHeaders = true;

IgxExporterOptionsBase

ignoreColumnsOrder: boolean = false

エクスポーターが IgxGrid の列順序を無視するかどうかを指定します。

let ignoreColumnsOrder = this.exportOptions.ignoreColumnsOrder;
this.exportOptions.ignoreColumnsOrder = true;

IgxExporterOptionsBase

ignoreColumnsVisibility: boolean = false

非表示列をエクスポートするかどうかを指定します。

let ignoreColumnsVisibility = this.exportOptions.ignoreColumnsVisibility;
this.exportOptions.ignoreColumnsVisibility = true;

IgxExporterOptionsBase

ignoreFiltering: boolean = false

フィルター アウトされた行をエクスポートするかどうかを指定します。

let ignoreFiltering = this.exportOptions.ignoreFiltering;
this.exportOptions.ignoreFiltering = true;

IgxExporterOptionsBase

ignoreGrouping: boolean = false

エクスポートしたデータを IgxGrid のようにグループ化するかどうかを指定します。

let ignoreGrouping = this.exportOptions.ignoreGrouping;
this.exportOptions.ignoreGrouping = true;

IgxExporterOptionsBase

ignoreMultiColumnHeaders: boolean = false

エクスポートされたデータが提供された IgxGrid のように複数列ヘッダーを含むかどうかを指定します。

let ignoreMultiColumnHeaders = this.exportOptions.ignoreMultiColumnHeaders;
this.exportOptions.ignoreMultiColumnHeaders = true;

IgxExporterOptionsBase

ignoreSorting: boolean = false

エクスポートしたデータを IgxGrid のようにソートするかどうかを指定します。 グループ化されたデータをエクスポートする場合、 ignoreSorting を true に設定すると、レコードのソートに依存するため、グループ化が失敗します。

let ignoreSorting = this.exportOptions.ignoreSorting;
this.exportOptions.ignoreSorting = true;

IgxExporterOptionsBase

pageOrientation: "portrait" | "landscape" = 'landscape'

ページの向きを指定します。(portrait または landscape、デフォルトは landscape)

let pageOrientation = this.exportOptions.pageOrientation;
this.exportOptions.pageOrientation = 'portrait';

IgxPdfExporterOptions

pageSize: string = 'a4'

ページのサイズを指定します。(A4、A3、letter、legal など、デフォルトは A4)

let pageSize = this.exportOptions.pageSize;
this.exportOptions.pageSize = 'letter';

IgxPdfExporterOptions

showTableBorders: boolean = true

表の境界を表示するかどうかを指定します。(デフォルトで true)

let showTableBorders = this.exportOptions.showTableBorders;
this.exportOptions.showTableBorders = false;

IgxPdfExporterOptions

アクセサー