Hi Team,
Found an issue with converting a DOCX with smart shapes and smart shapes with grouping, Causes separate one after another with smart shapes to have incorrect and overlapping rendering.
Ive attached the expected.png output with exporting/saving the document as PDF from word directly and the actual.png output using aspose to perform the conversion.
Code used:
var fileStream = File.OpenRead(path)
var document = new WordsDocument(fileStream, new LoadOptions {
LoadFormat = loadFormat
});
document.SavePdf();
public class WordsDocument : IAsposeEditableDocument {
// This must be wrapped in order to mock it
private readonly Document _document;
public WordsDocument() {
if (WordsLicense == null) {
WordsLicense = new License();
WordsLicense.SetLicense("Aspose.Total.lic");
}
}
public WordsDocument(Stream fileStream, LoadOptions options) : this() {
_document = new Document(fileStream, options);
}
private static License WordsLicense { get; set; }
public virtual Stream SavePdf() {
var outputStream = new MemoryStream();
_document.Save(outputStream, SaveFormat.Pdf);
return outputStream;
}
}
expected.png (158.3 KB)
actual.png (161.3 KB)