Hi, I am evaluating GemBox.Document for converting .docx to .html and it seems to be working quite well, except for one thing:
I have multiple .docx files that contain shape groups consisting of multiple images and sometimes text boxes and in the .html export these groups either show up as just one image from the group or not at all.
Is there a way to work around this?
Or are shape groups just not supported? If so, are there plans to support it in the future?
here is my code:
using GemBox.Document;
internal class Program {
private static void Main(string[] args) {
ComponentInfo.SetLicense("FREE-LIMITED-KEY");
ComponentInfo.FreeLimitReached += (sender, e) => e.FreeLimitReachedAction = FreeLimitReachedAction.ContinueAsTrial;
// path setup
string inputPath = "path\\to\\input.docx";
string outputSubfolder = "path\\to\\output\\test1_subfolder";
string outputPath = outputSubfolder + "\\output.html";
// load existing docx document
var document = DocumentModel.Load(inputPath);
// remove headers and footers
foreach (Section section in document.Sections) {
section.HeadersFooters.Clear();
// page setup
var pageSetup = section.PageSetup;
pageSetup.PageMargins.Top = 0;
pageSetup.PageMargins.Bottom = 0;
pageSetup.PageMargins.Left = 0;
pageSetup.PageMargins.Right = 0;
}
// save options
HtmlSaveOptions saveOptions = new() {
FilesDirectoryPath = outputSubfolder + "\\resources",
FilesDirectorySrcPath = "resources"
};
// save as html file
document.Save(outputPath, saveOptions);
}
}
GemBox.Document 35.0.1817 (via NuGet)
Windows 10, 64-bit
Happy to provide an example docx file, but it should be easily reproducible and I don’t think I can upload here.
I appreciate any input on this, thanks in advance!