mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-25 01:56:39 +02:00
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:
parent
8fc894c74c
commit
1a222edb46
1 changed files with 4 additions and 4 deletions
|
|
@ -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',
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue