Hello, I am trying to place a photo on a one page PDF. I want the image to be placed inside an absolute position box (top,left,bottom,right) and be centered. How do I get this done? I am thinking of placing the images inside a floating box as described below.
public void InsertPhoto( Document doc, string photoPath )
Page page = doc.Pages; FloatingBox photoBox = new Aspose.Pdf.FloatingBox(); photoBox.ZIndex = 10; photoBox.Margin = new MarginInfo(0, 0, 0, 0); photoBox.Top = 72; photoBox.Left = 72; photoBox.Height = 150; photoBox.Width = 150; photoBox.BackgroundColor = Aspose.Pdf.Color.Black; photoBox.VertialAlignment = VerticalAlignment.Top; photoBox.HorizontalAlignment = HorizontalAlignment.Center; page.Paragraphs.Add( photoBox );