fix(core): Word-Export — Logo-Seitenverhältnis korrekt (tatsächliche Pixel-Dimensionen)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thomas Reitz 2026-03-14 10:12:09 +01:00
parent 8fc894c74c
commit 1a222edb46

View file

@ -609,16 +609,16 @@ export class ProfileExportService {
// Platform-Logo // Platform-Logo
if (platformLogo) { if (platformLogo) {
try { try {
const logoBuffer = await sharp(platformLogo) const { data: logoBuffer, info: logoInfo } = await sharp(platformLogo)
.resize(120, 40, { fit: 'inside' }) .resize(140, 50, { fit: 'inside', withoutEnlargement: true })
.png() .png()
.toBuffer(); .toBuffer({ resolveWithObject: true });
leftParagraphs.push( leftParagraphs.push(
new Paragraph({ new Paragraph({
children: [ children: [
new ImageRun({ new ImageRun({
data: logoBuffer, data: logoBuffer,
transformation: { width: 120, height: 40 }, transformation: { width: logoInfo.width, height: logoInfo.height },
type: 'png', type: 'png',
}), }),
], ],