-
Notifications
You must be signed in to change notification settings - Fork 488
Closed
Description
Description
after use SetHeader Func, The Paragraph LineSpacing was be changed, the verticalAlignment of Paragraph change to top
Expected Behavior

Actual Behavior

Please include a reproducible code snippet or document attachment that
demonstrates the issue.
func main() {
doc := document.New()
defer doc.Close()
img, err := common.ImageFromFile("gophercolor.png")
if err != nil {
log.Fatalf("unable to create image: %s", err)
}
hdr := doc.AddHeader()
iref, err := hdr.AddImage(img)
if err != nil {
log.Fatalf("unable to to add image to document: %s", err)
}
para := hdr.AddParagraph()
imgInl, _ := para.AddRun().AddDrawingInline(iref)
imgInl.SetSize(1*measurement.Inch, 1*measurement.Inch)
// -----the only different is use or not the follow line code -----
// doc.BodySection().SetHeader(hdr, wml.ST_HdrFtrDefault)
text := `Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin lobortis, lectus dictum feugiat tempus, sem neque finibus enim, sed eleifend sem nunc ac diam. Vestibulum tempus sagittis elementum`
para = doc.AddParagraph()
para.SetLineSpacing(30, wml.ST_LineSpacingRuleAuto)
run := para.AddRun()
run.Properties().SetSize(18)
run.AddText(text)
para.Properties().VerticalAlignment()
doc.SaveToFile("header-footer.docx")
}
Metadata
Metadata
Assignees
Labels
No labels