Spacing above tables gets lost when converting to document model

Our app generates a PDF document by loading an HTML file into a DocumentModel and then saving it as a PDF. The HTML file contains margin styles. With most DocumentModel blocks these get converted to SpaceBefore and SpaceAfter properties in the `DocumentModel. But the table object doesn’t have these properties so the margin just gets ignored. This also happens if I wrap a the table in a div with margin. Is there anyway around this?

Hi Oscar,

Unfortunately, the problem is that the Table element in Word documents doesn’t have such formatting.

As a quick workaround, can you replace those top and bottom margins with <p> elements of the desired height?

Regards,
Mario

Yup, I can do that. Thanks for the response