diff --git a/public/datasheets/h1z2z2-k-de.pdf b/public/datasheets/h1z2z2-k-de.pdf
index c6f08c1d..0a05b687 100644
Binary files a/public/datasheets/h1z2z2-k-de.pdf and b/public/datasheets/h1z2z2-k-de.pdf differ
diff --git a/public/datasheets/h1z2z2-k-en.pdf b/public/datasheets/h1z2z2-k-en.pdf
index 11e4422d..9efcddb9 100644
Binary files a/public/datasheets/h1z2z2-k-en.pdf and b/public/datasheets/h1z2z2-k-en.pdf differ
diff --git a/public/datasheets/n2x2y-de.pdf b/public/datasheets/n2x2y-de.pdf
index 08a693d4..44dbc9aa 100644
Binary files a/public/datasheets/n2x2y-de.pdf and b/public/datasheets/n2x2y-de.pdf differ
diff --git a/public/datasheets/n2x2y-en.pdf b/public/datasheets/n2x2y-en.pdf
index 06fcd321..ead38be2 100644
Binary files a/public/datasheets/n2x2y-en.pdf and b/public/datasheets/n2x2y-en.pdf differ
diff --git a/public/datasheets/n2xfk2y-de.pdf b/public/datasheets/n2xfk2y-de.pdf
index d0af7d91..4f32f381 100644
Binary files a/public/datasheets/n2xfk2y-de.pdf and b/public/datasheets/n2xfk2y-de.pdf differ
diff --git a/public/datasheets/n2xfk2y-en.pdf b/public/datasheets/n2xfk2y-en.pdf
index c9488864..25a4e48d 100644
Binary files a/public/datasheets/n2xfk2y-en.pdf and b/public/datasheets/n2xfk2y-en.pdf differ
diff --git a/public/datasheets/n2xfkld2y-de.pdf b/public/datasheets/n2xfkld2y-de.pdf
index 3879fafa..afb2ef4a 100644
Binary files a/public/datasheets/n2xfkld2y-de.pdf and b/public/datasheets/n2xfkld2y-de.pdf differ
diff --git a/public/datasheets/n2xfkld2y-en.pdf b/public/datasheets/n2xfkld2y-en.pdf
index f654b056..8429855b 100644
Binary files a/public/datasheets/n2xfkld2y-en.pdf and b/public/datasheets/n2xfkld2y-en.pdf differ
diff --git a/public/datasheets/n2xs2y-de.pdf b/public/datasheets/n2xs2y-de.pdf
index f8f62c95..5de18f96 100644
Binary files a/public/datasheets/n2xs2y-de.pdf and b/public/datasheets/n2xs2y-de.pdf differ
diff --git a/public/datasheets/n2xs2y-en.pdf b/public/datasheets/n2xs2y-en.pdf
index 74cab1c6..f20b9c82 100644
Binary files a/public/datasheets/n2xs2y-en.pdf and b/public/datasheets/n2xs2y-en.pdf differ
diff --git a/public/datasheets/n2xsf2y-de.pdf b/public/datasheets/n2xsf2y-de.pdf
index 701bb782..241eeda0 100644
Binary files a/public/datasheets/n2xsf2y-de.pdf and b/public/datasheets/n2xsf2y-de.pdf differ
diff --git a/public/datasheets/n2xsf2y-en.pdf b/public/datasheets/n2xsf2y-en.pdf
index 05fd18dd..9c9d7cd2 100644
Binary files a/public/datasheets/n2xsf2y-en.pdf and b/public/datasheets/n2xsf2y-en.pdf differ
diff --git a/public/datasheets/n2xsfl2y-mv-de.pdf b/public/datasheets/n2xsfl2y-mv-de.pdf
index 1b31e035..c6484f72 100644
Binary files a/public/datasheets/n2xsfl2y-mv-de.pdf and b/public/datasheets/n2xsfl2y-mv-de.pdf differ
diff --git a/public/datasheets/n2xsfl2y-mv-en.pdf b/public/datasheets/n2xsfl2y-mv-en.pdf
index 9341192b..f74f60ec 100644
Binary files a/public/datasheets/n2xsfl2y-mv-en.pdf and b/public/datasheets/n2xsfl2y-mv-en.pdf differ
diff --git a/public/datasheets/n2xsy-de.pdf b/public/datasheets/n2xsy-de.pdf
index 33fb6ca8..7705a9a1 100644
Binary files a/public/datasheets/n2xsy-de.pdf and b/public/datasheets/n2xsy-de.pdf differ
diff --git a/public/datasheets/n2xsy-en.pdf b/public/datasheets/n2xsy-en.pdf
index 08dc40c1..c0144b4f 100644
Binary files a/public/datasheets/n2xsy-en.pdf and b/public/datasheets/n2xsy-en.pdf differ
diff --git a/public/datasheets/n2xy-de.pdf b/public/datasheets/n2xy-de.pdf
index e1ab18eb..fb2efa35 100644
Binary files a/public/datasheets/n2xy-de.pdf and b/public/datasheets/n2xy-de.pdf differ
diff --git a/public/datasheets/n2xy-en.pdf b/public/datasheets/n2xy-en.pdf
index fe2798bc..792ce399 100644
Binary files a/public/datasheets/n2xy-en.pdf and b/public/datasheets/n2xy-en.pdf differ
diff --git a/public/datasheets/na2x2y-de.pdf b/public/datasheets/na2x2y-de.pdf
index f074ea81..c471a459 100644
Binary files a/public/datasheets/na2x2y-de.pdf and b/public/datasheets/na2x2y-de.pdf differ
diff --git a/public/datasheets/na2x2y-en.pdf b/public/datasheets/na2x2y-en.pdf
index 4a38bdf6..2869387a 100644
Binary files a/public/datasheets/na2x2y-en.pdf and b/public/datasheets/na2x2y-en.pdf differ
diff --git a/public/datasheets/na2xfk2y-de.pdf b/public/datasheets/na2xfk2y-de.pdf
index fad1d67c..14faaf49 100644
Binary files a/public/datasheets/na2xfk2y-de.pdf and b/public/datasheets/na2xfk2y-de.pdf differ
diff --git a/public/datasheets/na2xfk2y-en.pdf b/public/datasheets/na2xfk2y-en.pdf
index 196c064f..7885d25b 100644
Binary files a/public/datasheets/na2xfk2y-en.pdf and b/public/datasheets/na2xfk2y-en.pdf differ
diff --git a/public/datasheets/na2xfkld2y-de.pdf b/public/datasheets/na2xfkld2y-de.pdf
index 41d484d3..47dc37a3 100644
Binary files a/public/datasheets/na2xfkld2y-de.pdf and b/public/datasheets/na2xfkld2y-de.pdf differ
diff --git a/public/datasheets/na2xfkld2y-en.pdf b/public/datasheets/na2xfkld2y-en.pdf
index 5add221a..f02b38c5 100644
Binary files a/public/datasheets/na2xfkld2y-en.pdf and b/public/datasheets/na2xfkld2y-en.pdf differ
diff --git a/public/datasheets/na2xs2y-de.pdf b/public/datasheets/na2xs2y-de.pdf
index 072884f5..8c2b4ecb 100644
Binary files a/public/datasheets/na2xs2y-de.pdf and b/public/datasheets/na2xs2y-de.pdf differ
diff --git a/public/datasheets/na2xs2y-en.pdf b/public/datasheets/na2xs2y-en.pdf
index 7b178aae..0f8f567f 100644
Binary files a/public/datasheets/na2xs2y-en.pdf and b/public/datasheets/na2xs2y-en.pdf differ
diff --git a/public/datasheets/na2xsf2y-de.pdf b/public/datasheets/na2xsf2y-de.pdf
index 0a45751f..1def7cd4 100644
Binary files a/public/datasheets/na2xsf2y-de.pdf and b/public/datasheets/na2xsf2y-de.pdf differ
diff --git a/public/datasheets/na2xsf2y-en.pdf b/public/datasheets/na2xsf2y-en.pdf
index 464b9b20..e4658843 100644
Binary files a/public/datasheets/na2xsf2y-en.pdf and b/public/datasheets/na2xsf2y-en.pdf differ
diff --git a/public/datasheets/na2xsfl2y-mv-de.pdf b/public/datasheets/na2xsfl2y-mv-de.pdf
index de8bba7b..d9f9d4df 100644
Binary files a/public/datasheets/na2xsfl2y-mv-de.pdf and b/public/datasheets/na2xsfl2y-mv-de.pdf differ
diff --git a/public/datasheets/na2xsfl2y-mv-en.pdf b/public/datasheets/na2xsfl2y-mv-en.pdf
index 8313b108..6230473b 100644
Binary files a/public/datasheets/na2xsfl2y-mv-en.pdf and b/public/datasheets/na2xsfl2y-mv-en.pdf differ
diff --git a/public/datasheets/na2xsy-de.pdf b/public/datasheets/na2xsy-de.pdf
index 0b604ed7..2d58153d 100644
Binary files a/public/datasheets/na2xsy-de.pdf and b/public/datasheets/na2xsy-de.pdf differ
diff --git a/public/datasheets/na2xsy-en.pdf b/public/datasheets/na2xsy-en.pdf
index 671d42fa..6adca8fc 100644
Binary files a/public/datasheets/na2xsy-en.pdf and b/public/datasheets/na2xsy-en.pdf differ
diff --git a/public/datasheets/na2xy-de.pdf b/public/datasheets/na2xy-de.pdf
index c2bc3da0..61fb1e92 100644
Binary files a/public/datasheets/na2xy-de.pdf and b/public/datasheets/na2xy-de.pdf differ
diff --git a/public/datasheets/na2xy-en.pdf b/public/datasheets/na2xy-en.pdf
index 9cfaa36f..c04b842c 100644
Binary files a/public/datasheets/na2xy-en.pdf and b/public/datasheets/na2xy-en.pdf differ
diff --git a/public/datasheets/nay2y-de.pdf b/public/datasheets/nay2y-de.pdf
index 390261d3..c393a85a 100644
Binary files a/public/datasheets/nay2y-de.pdf and b/public/datasheets/nay2y-de.pdf differ
diff --git a/public/datasheets/nay2y-en.pdf b/public/datasheets/nay2y-en.pdf
index 1c5a1476..954f05b5 100644
Binary files a/public/datasheets/nay2y-en.pdf and b/public/datasheets/nay2y-en.pdf differ
diff --git a/public/datasheets/naycwy-de.pdf b/public/datasheets/naycwy-de.pdf
index 0fd85977..d9177bb7 100644
Binary files a/public/datasheets/naycwy-de.pdf and b/public/datasheets/naycwy-de.pdf differ
diff --git a/public/datasheets/naycwy-en.pdf b/public/datasheets/naycwy-en.pdf
index e4f647bc..1187f70b 100644
Binary files a/public/datasheets/naycwy-en.pdf and b/public/datasheets/naycwy-en.pdf differ
diff --git a/public/datasheets/nayy-de.pdf b/public/datasheets/nayy-de.pdf
index 43dc1b0c..e9ceda9a 100644
Binary files a/public/datasheets/nayy-de.pdf and b/public/datasheets/nayy-de.pdf differ
diff --git a/public/datasheets/nayy-en.pdf b/public/datasheets/nayy-en.pdf
index 2749f547..1776695c 100644
Binary files a/public/datasheets/nayy-en.pdf and b/public/datasheets/nayy-en.pdf differ
diff --git a/public/datasheets/ny2y-de.pdf b/public/datasheets/ny2y-de.pdf
index 16231d6f..0f2808d8 100644
Binary files a/public/datasheets/ny2y-de.pdf and b/public/datasheets/ny2y-de.pdf differ
diff --git a/public/datasheets/ny2y-en.pdf b/public/datasheets/ny2y-en.pdf
index 2ab07ec4..c69f3139 100644
Binary files a/public/datasheets/ny2y-en.pdf and b/public/datasheets/ny2y-en.pdf differ
diff --git a/public/datasheets/nycwy-de.pdf b/public/datasheets/nycwy-de.pdf
index ed74d924..7066efe2 100644
Binary files a/public/datasheets/nycwy-de.pdf and b/public/datasheets/nycwy-de.pdf differ
diff --git a/public/datasheets/nycwy-en.pdf b/public/datasheets/nycwy-en.pdf
index d5c178cd..19977f5d 100644
Binary files a/public/datasheets/nycwy-en.pdf and b/public/datasheets/nycwy-en.pdf differ
diff --git a/public/datasheets/nyy-de.pdf b/public/datasheets/nyy-de.pdf
index 4fc40a88..0de72ce0 100644
Binary files a/public/datasheets/nyy-de.pdf and b/public/datasheets/nyy-de.pdf differ
diff --git a/public/datasheets/nyy-en.pdf b/public/datasheets/nyy-en.pdf
index bf8e13eb..b230e7df 100644
Binary files a/public/datasheets/nyy-en.pdf and b/public/datasheets/nyy-en.pdf differ
diff --git a/scripts/generate-pdf-datasheets.ts b/scripts/generate-pdf-datasheets.ts
index f389eed0..3e614330 100644
--- a/scripts/generate-pdf-datasheets.ts
+++ b/scripts/generate-pdf-datasheets.ts
@@ -56,18 +56,9 @@ function normalizeExcelKey(value: string): string {
.replace(/[^A-Z0-9]+/g, '');
}
-function extractDescriptionHtmlFromMdxBody(body: string): string {
- const content = String(body || '').trim();
- if (!content) return '';
-
- // MDX product files are wrapped like:
- //
- //
- //
- // For PDF, we only want the inner description content.
- const withoutOpen = content.replace(/^\s*\s*/i, '');
- const withoutClose = withoutOpen.replace(/\s*<\/ProductTabs>\s*$/i, '');
- return withoutClose.trim();
+function extractDescriptionFromMdxFrontmatter(data: any): string {
+ const description = normalizeValue(String(data?.description || ''));
+ return description;
}
function buildMdxIndex(locale: 'en' | 'de'): MdxIndex {
@@ -93,7 +84,7 @@ function buildMdxIndex(locale: 'en' | 'de'): MdxIndex {
const categories = Array.isArray(data.categories) ? data.categories.map((c: any) => normalizeValue(String(c))).filter(Boolean) : [];
const images = Array.isArray(data.images) ? data.images.map((i: any) => normalizeValue(String(i))).filter(Boolean) : [];
- const descriptionHtml = extractDescriptionHtmlFromMdxBody(parsed.content);
+ const descriptionHtml = extractDescriptionFromMdxFrontmatter(data);
const slug = path.basename(file, '.mdx');
idx.set(normalizeExcelKey(title), { slug, title, sku, categories, images, descriptionHtml });
diff --git a/scripts/pdf/model/build-datasheet-model.ts b/scripts/pdf/model/build-datasheet-model.ts
index c604e387..899a1ed2 100644
--- a/scripts/pdf/model/build-datasheet-model.ts
+++ b/scripts/pdf/model/build-datasheet-model.ts
@@ -639,10 +639,10 @@ function extractAbbrevColumnsFromMediumVoltageHeader(args: {
function buildMediumVoltageCrossSectionTableFromNewExcel(args: {
product: ProductData;
locale: 'en' | 'de';
-}): BuildExcelModelResult {
+}): BuildExcelModelResult & { legendItems: KeyValueItem[] } {
const mv = findMediumVoltageCrossSectionExcelForProduct(args.product) as MediumVoltageCrossSectionExcelMatch | null;
- if (!mv || !mv.rows.length) return { ok: false, technicalItems: [], voltageTables: [] };
- if (!mv.crossSectionKey) return { ok: false, technicalItems: [], voltageTables: [] };
+ if (!mv || !mv.rows.length) return { ok: false, technicalItems: [], voltageTables: [], legendItems: [] };
+ if (!mv.crossSectionKey) return { ok: false, technicalItems: [], voltageTables: [], legendItems: [] };
const abbrevCols = extractAbbrevColumnsFromMediumVoltageHeader({
headerRow: mv.headerRow,
@@ -651,7 +651,19 @@ function buildMediumVoltageCrossSectionTableFromNewExcel(args: {
crossSectionKey: mv.crossSectionKey,
ratedVoltageKey: mv.ratedVoltageKey,
});
- if (!abbrevCols.length) return { ok: false, technicalItems: [], voltageTables: [] };
+ if (!abbrevCols.length) return { ok: false, technicalItems: [], voltageTables: [], legendItems: [] };
+
+ // Collect legend items: abbreviation -> description from header row
+ const legendItems: KeyValueItem[] = [];
+ for (const col of abbrevCols) {
+ const description = normalizeValue(String(mv.headerRow[col.colKey] || ''));
+ if (description && description !== col.colKey) {
+ legendItems.push({
+ label: col.colKey,
+ value: description,
+ });
+ }
+ }
const byVoltage = new Map();
for (let i = 0; i < mv.rows.length; i++) {
@@ -710,7 +722,7 @@ function buildMediumVoltageCrossSectionTableFromNewExcel(args: {
voltageTables.push({ voltageLabel: vKey, metaItems, crossSections, columns });
}
- return { ok: true, technicalItems: [], voltageTables };
+ return { ok: true, technicalItems: [], voltageTables, legendItems };
}
export function buildDatasheetModel(args: { product: ProductData; locale: 'en' | 'de' }): DatasheetModel {
@@ -726,7 +738,7 @@ export function buildDatasheetModel(args: { product: ProductData; locale: 'en' |
// Cross-section tables: for medium voltage only, prefer the new MV sheet (abbrev columns in header row).
const crossSectionModel = isMediumVoltageProduct(args.product)
? buildMediumVoltageCrossSectionTableFromNewExcel({ product: args.product, locale: args.locale })
- : { ok: false, technicalItems: [], voltageTables: [] };
+ : { ok: false, technicalItems: [], voltageTables: [], legendItems: [] };
const voltageTablesSrc = crossSectionModel.ok
? crossSectionModel.voltageTables
@@ -762,5 +774,6 @@ export function buildDatasheetModel(args: { product: ProductData; locale: 'en' |
labels,
technicalItems: excelModel.ok ? excelModel.technicalItems : [],
voltageTables,
+ legendItems: crossSectionModel.legendItems || [],
};
}
diff --git a/scripts/pdf/model/types.ts b/scripts/pdf/model/types.ts
index faf20c4b..1e043fba 100644
--- a/scripts/pdf/model/types.ts
+++ b/scripts/pdf/model/types.ts
@@ -47,5 +47,6 @@ export type DatasheetModel = {
};
technicalItems: KeyValueItem[];
voltageTables: DatasheetVoltageTable[];
+ legendItems: KeyValueItem[];
};
diff --git a/scripts/pdf/react-pdf/DatasheetDocument.tsx b/scripts/pdf/react-pdf/DatasheetDocument.tsx
index 8f98a304..44058aed 100644
--- a/scripts/pdf/react-pdf/DatasheetDocument.tsx
+++ b/scripts/pdf/react-pdf/DatasheetDocument.tsx
@@ -62,12 +62,18 @@ export function DatasheetDocument(props: { model: DatasheetModel; assets: Assets
{model.voltageTables.map((t: DatasheetVoltageTable) => (
-
+
{`${model.labels.crossSection} — ${t.voltageLabel}`}
))}
+
+ {model.legendItems.length ? (
+
+ ) : null}
);
diff --git a/scripts/pdf/react-pdf/assets.ts b/scripts/pdf/react-pdf/assets.ts
index cd7a89ac..76ceeea8 100644
--- a/scripts/pdf/react-pdf/assets.ts
+++ b/scripts/pdf/react-pdf/assets.ts
@@ -27,16 +27,19 @@ async function readBytesFromPublic(localPath: string): Promise {
function transformLogoSvgToPrintBlack(svg: string): string {
return svg
- .replace(/fill\s*:\s*white/gi, 'fill:#0E2A47')
- .replace(/fill\s*=\s*"white"/gi, 'fill="#0E2A47"')
- .replace(/fill\s*=\s*'white'/gi, "fill='#0E2A47'");
+ .replace(/fill\s*:\s*white/gi, 'fill:#000000')
+ .replace(/fill\s*=\s*"white"/gi, 'fill="#000000"')
+ .replace(/fill\s*=\s*'white'/gi, "fill='#000000'")
+ .replace(/fill\s*:\s*#[0-9a-fA-F]{6}/gi, 'fill:#000000')
+ .replace(/fill\s*=\s*"#[0-9a-fA-F]{6}"/gi, 'fill="#000000"')
+ .replace(/fill\s*=\s*'#[0-9a-fA-F]{6}'/gi, "fill='#000000'");
}
async function toPngBytes(inputBytes: Uint8Array, inputHint: string): Promise {
const ext = (path.extname(inputHint).toLowerCase() || '').replace('.', '');
if (ext === 'png') return inputBytes;
- if (ext === 'svg' && /\/media\/logo\.svg$/i.test(inputHint)) {
+ if (ext === 'svg' && (/\/media\/logo\.svg$/i.test(inputHint) || /\/logo-blue\.svg$/i.test(inputHint))) {
const svg = Buffer.from(inputBytes).toString('utf8');
inputBytes = new Uint8Array(Buffer.from(transformLogoSvgToPrintBlack(svg), 'utf8'));
}
diff --git a/scripts/pdf/react-pdf/components/DenseTable.tsx b/scripts/pdf/react-pdf/components/DenseTable.tsx
index 1e667e44..76d56b3e 100644
--- a/scripts/pdf/react-pdf/components/DenseTable.tsx
+++ b/scripts/pdf/react-pdf/components/DenseTable.tsx
@@ -141,7 +141,7 @@ export function DenseTable(props: {
const headerFontSize = cols.length >= 14 ? 5.7 : cols.length >= 12 ? 5.9 : cols.length >= 10 ? 6.2 : 6.6;
return (
-
+