Merge/convert started failing

I have the similar issue as:

Suddenly my word fields are not replaced anymore and the doc to pdf conversion fails with:

"Could not find file 'C:\\Users\\ContainerAdministrator\\AppData\\Local\\Temp\\ASPNETCORE_8c7bad78-0508-493e-86e0-efb593ab251d.tmp'."

@michel.liesmons

We are sorry for the inconvenience. But I am afraid we cannot reproduce the issue at our end. We will appreciate it if you please share your sample code along with the complete error message. We will investigate it and guide you.

Hi Ahmad,

This same code has been working for the last year or so. Today it automagically works again, no more crash. The data is specified as XML.

For another, newer, report that has been working for the last couple of months,
the merge does no longer fill my word fields (data specified as a JSON).
The pdf is correctly generated showing the unprocessed fields, where as yesterday it crashed…

Can I share the word template and JSON data somehow?

kr,
Michel.

@michel.liesmons

We apologize for your inconvenience. It seems it was some temporary issue, while we were deploying Aspose.Words Cloud 20.10 release.

Yes, please share the template and data file. We will investigate it and share our findings with you.

This is the code that used to work for the last couple of months:

        var output = WordsApi.ExecuteMailMergeOnline(
                new ExecuteMailMergeOnlineRequest(
                    new Word.IssueTemplate().GetTemplate(),
                    await Word.IssueTemplate.GetData(issue, BlobService, projectsService)));

Both GetTemplate() and GetData() return a stream from these files: Input.zip (71.5 KB)

Data contains a reference to images in protected blob storage, the links will probably be expired by now, but can be replaced by any other link to an image.

I have another issue making the images fit in a table cell with attributes set to ‘no auto resize’, they overflow the cell as opposed to inserting them interactively using Word.

kr,
Michel.

@michel.liesmons

Thanks for sharing the source documents. We are investigating the issue and will update you shortly.

@michel.liesmons

We have recently released Aspose.Words Cloud 20.10. And I am unable to replicate the issue with it. Please note I was unable to access your last two images due to the expired signature, so I replaced it another remote image link.Testmailmerge.zip (382.1 KB). Please double check with the latest release and confirm.

You can define image size in the template as follows:

Image(width[pt|%];height[pt|%]):FieldName

The format is case-insensitive. The values of the width and the height should represent double constant values using the dot as the decimal separator (i.e. using invariant culture). Negative values should be used to indicate that the original values of the corresponding image dimensions should be used. If no unit is specified, points are used by default. If a unit other than “pt” or “%” is specified, then the image size parsing is considered to be failed and the original values of the corresponding image dimensions are used.

Hopefully, it will resolve the issue. Otherwise, please share the problematic template, data file and expected output. It will help us to understand and address your issue exactly.

Hi Ahmad,

Thank you for your testing and the hint on image sizing!.

My word template still does not get populated.

I notice the latest NuGet package I seem to have access to (prerelease included) is 20.9.0.
Could this be the reason?

kr,
Michel.

@michel.liesmons

I have tested the scenario with Aspose.Words Cloud SDK for .NET 20.9 using following code and unable to replicate the issue. Please ensure you are setting withRegions parameter to true.

string localDocumentFile = "C:/Input/Template.docx";
    string localDataFile = "C:/Input/Data1.json";

    var request = new ExecuteMailMergeOnlineRequest(
        template: File.OpenRead(localDocumentFile),
        data: File.OpenRead(localDataFile),
        withRegions: true
    );

    var actual = wordsApi.ExecuteMailMergeOnline(request);
    var fileStream = System.IO.File.Create("C:/Temp/TestMailMerge.docx");
    actual.CopyTo(fileStream);
    fileStream.Close(); 

Ahmad,

I could slap myself on the head. The true for withRegions disappeared during a merge.
Everything is working fine again.

Thanks for your efforts, much appreciated!

Kr,
Michel.

1 Like

Hi Ahmad,

Finally found some time to try out image sizing.

I cannot seem to make it work. Whatever I enter it does not affect the picture.
The picture is in PNG format, and streamed from blob storage.

Whether the picture is inside a table cell (“do not auto resize to fit contents”) or just on a page, no change.

Attached the template and the result.

% and pt, do they scale or crop?

Thanks in advance for your input.

Kr,
Michel.

issue.zip (1.4 MB)

@michel.liesmons

We have noticed that it is not working as expected, so logged a ticket WORDSCLOUD-1447 for further investigation and rectification. We will notify you as soon as it is resolved.

Hi Ahmad,

Thanks, looking forward to a solution.

Ideally a WYSIWYG solution would be very nice. Instead of hard-coding some values, we could expect the interactive behavior of Word to be honored: The size and properties of a table and cell determine the position size and resizing (not cropping) behavior of an injected picture.

Kr,
Michel.

1 Like

@michel.liesmons

Thanks for the suggestion. We will consider your suggestion during the investigation.

2 posts were split to a new topic: ExecuteMailMergeOnline API throws timeout

Hi Ahmad,

Any news on this one?
I tried {image(100;100):path_to_my_image.jpg} but there is no resizing.
The field is inside a table cell.

Kr,
Michel.

@michel.liesmons

Im afraid the issue is still not resolved due to the other priority issues. However, I have requested for the ETA and will share an update with you accordingly.

The issues you have found earlier (filed as WORDSCLOUD-1447) have been fixed in this update. This message was posted using Bugs notification tool by Ivanov_John

Works like a charm, thanks.

1 Like

I notice in the release notes there is a new timeout in Aspose.Words.Cloud.Sdk.Configuration, but I cannot to seem to find any info on how to use it, or on the units ([milli]seconds, minuyes)?