@alexey.noskov Thanks for your elaboration. I think the “appropriate size” you mentioned may be related to "dxaOrig " and “dyaOrig” i said before. About how to decide the appropriate EMF size from the Visio file, do you have any suggestion?
@space_chang Unfortunately, it is hard to say what is the appropriate size. I would suggest you to try creating Visio OLE object using MS Word and investigate what size of the presentation image MS Word uses for the particular OLE object. Then you can try creating the similar image using Aspose.Diagrams.
@alexey.noskov This won’t be a available method to calculate the size for my use cases becuase my Visio diagram will vary by input data.
And if i use MS Word in my application manually, i can insert Visio into DOCX directly instead of only creating OLE object with appropriate size and using your library to insert it into DOCX.
What i want is to find a solution to implement it without any manual work on Linux.
@space_chang I mean not to use MS Word to calculate image size permanently. I mean to use MS Word to determine MS Word logic to calculate the image size, i.e. for investigation purposes, and then use the same logic in your code to generate presentation images.
@alexey.noskov Unfortunately, i ever tried this method. but it cannot work well. for different size of visio file, the generated emf size vary without stable logic when using MS word. And I cannot figure out any specific reason to that.
@space_chang Unfortunately, Aspose.Words does not control creation of the presentation images. So, I am afraid, we cannot help you in determining the algorithm MS Word uses for creating these images upon insertion of OLE objects.
@alexey.noskov it’s a pity that both of us cannot find any availble solution to that. If it is like that, i think this issue cannot be fixed though i use both aspose.words and aspose.diagram in my application.
because we cannot figure out exact behavior of MS word to that.
@space_chang I think that both MS Word and Visio are involved in the process. But how there are interaction with each other is a black box.