-
Hi! I'm having an issue when adding an base64 encoded png image in the header section. The image becomes whiter when it's displayed in the header if compared to the same image in the body (children) section. I can give more details if necessary and any help is appreciated, thank you very much! Example code: sections: [
{
headers: {
default: new Header({
children: [
new Paragraph({
children: [
new ImageRun({
data: headerImage, // whiter headerImage is displayed in generated docx
transformation: {
width: 800,
height: 113,
},
floating: {
horizontalPosition: {
relative: HorizontalPositionRelativeFrom.LEFT_MARGIN,
align: AlignmentType.LEFT,
},
verticalPosition: {
relative: VerticalPositionRelativeFrom.TOP_MARGIN,
align: 'top',
},
},
}),
],
}),
],
}),
},
children: [
new Paragraph({
alignment: AlignmentType.CENTER,
children: [
new ImageRun({
data: headerImage, // normal headerImage is displayed in generated docx
transformation: {
width: 500,
height: 150,
},
}),
],
}),
],
},
... |
Beta Was this translation helpful? Give feedback.
Answered by
dolanmiu
Sep 9, 2021
Replies: 1 comment 2 replies
-
It's whiter probably because of Microsoft Word
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
LSantos06
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's whiter probably because of Microsoft Word
docx
does not do any processing on the images