How do you create a floating image in Aspose.Pdf. I want a paragraph or a set of paragraphs to flow around an image that is horizontally aligned to the right.
Thanks for your inquiry.
Here is an example on how to create a floating image:
Pdf pdf = new Pdf();
Section section = new Section(pdf);
FloatingBox box1 = new FloatingBox(140, 80);
box1.BoxHorizontalPositioning = BoxHorizontalPositioningType.Margin;
box1.Left = 200;
box1.BoxVerticalPositioning = BoxVerticalPositioningType.Page;
box1.Top = 300;
Image image1 = new Image();
image1.ImageInfo.File = “C:/Images/Apple.jpg”;
image1.ImageInfo.ImageFileType = ImageFileType.Jpeg;
Please give it a try.