我有一个封面,其中有一张占据大部分页面的图片。
在那张图片上,我放置了另一张动态图片,但在这两张图片上,我需要再放置一张小的徽标图片,这就是它出错的地方(徽标图片最终位于第二层图片的右下边框)。
第一层图片
var myImage = section.AddImage(Server.MapPath("~/Content/Images/Forside.png"));
myImage.Height = "23cm";
myImage.Width = "21cm";
myImage.RelativeVertical = RelativeVertical.Page;
myImage.RelativeHorizontal = RelativeHorizontal.Page;
myImage.WrapFormat.Style = WrapStyle.Through;
第二层图片
MigraDoc.DocumentObjectModel.Shapes.Image image1 = section.AddImage(@model.UrlImage);
image1.Width = "15.5cm";
image1.Height = "8cm";
image1.RelativeHorizontal = RelativeHorizontal.Character;
image1.RelativeVertical = RelativeVertical.Line;
image1.Left = Unit.FromCentimeter(0.2);
image1.Top = Unit.FromCentimeter(8.6);
第三层图片
var image4 = section.AddImage(Server.MapPath("~/Content/Images/sun icon.png"));
image4.RelativeHorizontal = RelativeHorizontal.Character;
image4.RelativeVertical = RelativeVertical.Line;
image4.WrapFormat.DistanceLeft = Unit.FromCentimeter(0.2);
image4.WrapFormat.DistanceTop = Unit.FromCentimeter(6.6);
image4.WrapFormat.Style = WrapStyle.Through;
有任何想法吗?