facebooktwittermenuarrow-up

GemBox Support Forum

Conversion of documents containing SmartArt

So we are trying to convert a document that contains SmartArt to PDF, but it is not drawn.
Is it not currently supported? i can’t seem to find anything about using SmartArt.

Hi Søren,

Yes, I’m afraid that GemBox.Document currently doesn’t provide API support for SmartArt elements.
These elements are currently supported only through preservation (when loading from DOCX file and saving to DOCX file).

We have this feature request in our feature request collection and please feel free to vote for it in order to boost its priority: Support for Smart Art in PDF

Unfortunately at this moment, I cannot tell you exactly when it will be implemented.
Please note that we prioritize feature request implementations by the number of users requesting them and currently we are working on some other features that have greater priority (more user requests).

Regards,
Mario

Thanks for the reply Mario. I am very sorry to hear that.
Is there any automatic workaround, or detection strategy to alert the user of this?

Søren you could try something like this:

bool hasUnsupportedElement = document
    .GetChildElements(true, ElementType.PreservedInline, ElementType.PreservedDrawingElement)
    .Any();

This will detect any unsupported inline or drawing element.

Perhaps you could additionally check the raw content on those elements and isolate just the ones you want to detect. For example, something like this:

bool hasUnsupportedElement = document
    .GetChildElements(true, ElementType.PreservedInline, ElementType.PreservedDrawingElement)
    .Where(element => element.ToString().Contains("http://schemas.openxmlformats.org/drawingml/2006/diagram"))
    .Any();

Regards,
Mario

1 Like