Images in header is no sized correctly

Hi. I am creating a docx in power automate, when I map an image in the header, the resulting document has a wrong image size.

The template

The generated document

The header image file.

I also tried setting a size in the template, example {{header}:picture(1000)}, but if I set a number greater than 1000, the image is not show

Hi @dgarrighi,

I passed the details to our developers to check. I'll keep you posted about the results.

Best regards,
Petr
Plumsail team

Hi @dgarrighi,

We tried to reproduce your case with the attached image but we get a result like this one:

I tried with "Production" mode in Processes since the testing watermark affects the picture.

Please try to reproduce it without the testing watermark and share with us your docx template and the original picture if the issue persists.

You can also send the details to support@plumsail.com with references to the thread.

Best regards,
Petr
Plumsail team

Hi @Petr
I'm using the power automate connector.
I don´t think that the problem is the production or free licence. I don't have a production yet, I'm only testing the product.

I tried adding the token outside the header, and the result is the same.

Example, this is mi Docx template, with the image in the header, and body.

In Power Automate, I'm getting the template, and the image from Sharepoint

The image is formatted as base64,

And the result:

I also tried with sizes:

and the result. the picture(1000,300) not works.
image

The formatter picture() is in pixel?

Hi @dgarrighi,

Could you share screenshot with the Plumsail action and its details from the Power Automate flow?

I guess you can use the JSON directly in the Plumsail action and not in the Create variable action?

like this

image

Also, regarding the testing watermark. If you're using Start documents generation process then probably it starts a process in the Testing mode. Production mode is also available in trial.

Otherwise you can create a Production key on the page and add it to the Power Automate action

https://account.plumsail.com/documents/api-keys

Best regards,
Petr
Plumsail team

Hi @Petr
I could reproduce the error, let me show It.

In the web, if I upload the template docx, and test it, the image is rendered worng.

And the result:

But, if I edit the template Online, modify only a space for example, and save it, when I test it again, the result is ok

The template uploaded, and after edit it online, the token {!header}:picture()} is not modified at all, but the result is diferent...

I share you the template docx
Cotizacion Guatemala Template toyota - Copy.docx (227.3 KB)
And the Json that I'm testing
test.json (35.4 KB)

Hello Diego! I informed developers about such a behaviour. Still, you could download the modified template after deleting the space and use it forth as it solves the issue.

The issue was caused by that the paragraphs with the picture tokens had fixed height:

To solve the issue, you need to change the value, for example to single-line spacing.