Metafile cannot be processed: Could not create the bitmap with the specified parameters

Could you please prioritize fixing WORDSNET-26197.
This occurs also with version 24.1 and is very annoying, especially because aspose.words stops rendering the rest of the graphics after this error occurs and you get very incomplete images.

Metafile cannot be processed: Could not create the bitmap with the specified parameters. Possible lack of system resources.: java.lang.IllegalArgumentException: Width (-6) and height (17)

see https://forum.aspose.com/t/273999

@THaase Could you please attach your problematic image here for testing? The images in the another topic are JPEGs not metafiles. So most likely you have encountered another problem.

x.zip (3.2 KB)

@THaase Thank you for additional information. Unfortunately, the problem is not reproducible on my side. I have used the following code for testing:

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.insertImage("C:\\Temp\\x.emf");
doc.save("C:\\Temp\\out.docx");

Here is the output: out.docx (10.8 KB)

Ah, I forgot: please use output format pdf. Now you see that there are image parts missing.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.insertImage("C:\\Temp\\x.emf");
doc.save("C:\\Temp\\out.pdf");

@THaase There is no exception on my side. However, the metafile is rendered improperly in PDF.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-26547

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

I’m wondering why you mention “free support policies”. We have purchased PAID business support.

@THaase This is auto message when topic is linked to the issue. If you would like the issue to be treated on the priority basis, you should escalate the issue in the Paid Support Helpdesk . Then my colleagues from Paid Support team will raise the issue priority.

The issues you have found earlier (filed as WORDSNET-26547) have been fixed in this Aspose.Words for Java 24.3 update.