SetPicturePosition

sepPictlePortion(nshftX,nshftY)++

设置当前表单内图片位置

  • 0图片置左上角
  • 50码图片置中
  • 百元图片置右下

参数:

名称 类型 描述性
shiftx 百分数

水平定位测量百分比

shiftY 百分数

垂直位置测量百分比

返回时间 :

类型
布林安

实例

拷贝代码
builder.CreateFile("docx")!varoDocuments=api.GetDocumentVar OpictureForm = Api.CreatePictivarolements=ODocument.GetEplement0oParagraph.AddElement(oPictureForm)!oPictureForm.SetImage("https://api.onlyoffice.com/content/img/docbuilder/examples/user-profile.png")!oPictureForm.SetPicturePosition(70, 70)!varastion=OpictureForm.GetPicturePostionodeptes = Api.CreatelementsodtextoParagraph.AddLineBreak()!开始i=0< 位子. 长度++/varnshiftsadText (''+nshft)oParagraph.AddLineBreak()!ODocument.Pushbuilder.SaveFile("docx", "SetPicturePosition.docx")!builder.CloseFile();

结果文档