I am using Aspose.Pdf version 10.3. I have the code snippet below. When the pdf is rendered the image is showing left justified, and not how I have aligned the image. Please help.
var tc = TypeDescriptor.GetConverter(typeof (Bitmap));
var ms = new MemoryStream();
var bitMap = (Bitmap) tc.ConvertFrom(imgStream);
bitMap.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
ms.Position = 0;
var img = new Aspose.Pdf.Image();
img.ImageStream = ms; //bitmap memory stream
img.HorizontalAlignment = HorizontalAlignment.Center;
var document = new Aspose.Pdf.Document();
document.Pages.Add();
document.Pages[1].Paragraphs.Add(img);
var tc = TypeDescriptor.GetConverter(typeof (Bitmap));
var ms = new MemoryStream();
var bitMap = (Bitmap) tc.ConvertFrom(imgStream);
bitMap.Save(ms, System.Drawing.Imaging.ImageFormat.Bmp);
ms.Position = 0;
var img = new Aspose.Pdf.Image();
img.ImageStream = ms; //bitmap memory stream
img.HorizontalAlignment = HorizontalAlignment.Center;
var document = new Aspose.Pdf.Document();
document.Pages.Add();
document.Pages[1].Paragraphs.Add(img);