Hello,
Thank you for your answer.
1. Tested with many documents, even empty ones. It may be pdf or docx - same result.
2. Test code:
- Code: Select all
Spire.License.LicenseProvider
.SetLicenseFileFullPath("license.elic.xml");
var doc = new Document();
var section = doc.AddSection();
var para = section.AddParagraph();
var pic = new DocPicture(doc);
pic.LoadImage("file-icon.jpg");
para.AppendOleObject("קובץ לדוגמה.pdf", pic, OleObjectType.Package);
doc.SaveToFile("Result.docx");
as a result the embeded file name is
קובץ לדוגמה.pdf
Tested with
OleLinkType.Embed to.
3. Application type is Console App dotnet core net6.0, net7.0
4. Tested on several environments: macOS Ventura, Windows 11 Pro (m1 parallels), Windows 11 Pro (Intel) and Windows server 2019
All the environments are x64, region - Israel
Thank you very much!
P.S. In addition the one more issue we have:
After clicking on the embedded item icon switches to original icon by file type and the filename shown without any word-wrapping.
And here are two options what happens:
1. The width of the icon was not set - so if the file name is too long it fills all document width and may scrolls out to.
2. The width of the icon was set - so it fills all available width of replaced icon and if the file name is too long the height of the object that appears (file-type-icon + file-name) is too small.