unidoc/unioffice

How to display the picture under the text

Closed this issue · 2 comments

code:
imgRef, err := doc.AddImage(bgImg)
t, err := run.AddDrawingAnchored(imgRef)
if err != nil {
logger.Error(err)
}
t.SetAlignment(wml.WdST_AlignHCenter, wml.WdST_AlignVBottom)
t.SetSize(21.04measurement.Centimeter, 8.54measurement.Centimeter)
t.SetTextWrapSquare(wml.WdST_WrapTextBothSides)

I want to achieve:
img

Welcome! Thanks for posting your first issue. The way things work here is that while customer issues are prioritized,
other issues go into our backlog where they are assessed and fitted into the roadmap when suitable.
If you need to get this done, consider buying a license which also enables you to use it in your commercial products.
More information can be found on https://unidoc.io/

Okay, I already know.After comparing the XML, I found behindDoc parameter. Through the code t.X().BehindDocAttr=true setting, I also need to set t.SetTextWrapNone()