Quantcast
Viewing all articles
Browse latest Browse all 3131

Centering Images

I'm attempting to center an image on a page, but as far as I can tell the HorizontalAlignment property is not having any effect.  The following ends up being left-aligned:

   Image image = new Image();
   image.File = @"c:\images\image.png";
   image.HorizontalAlignment = HorizontalAlignment.Center;
   pdf.Pages[1].Paragraphs.Add(image);

Is there anything else I should be doing to ensure the image is centered?

Viewing all articles
Browse latest Browse all 3131

Trending Articles