Hiya,
I'm trying to set an image as a background for the entire pdf page. I've currently got the following:
Quote:
public void BeforeRender(object sender, AcmPageEventArgs e) {
var pageLayout = new AcmPageLayout(new AcmPadding(0));
var render = new AcmRender(e.Page, 0, pageLayout);
var block = new AcmBlock();
block.Style.Top = 0f;
block.Style.Left = 0f;
var content = new AcmContent(new AcmImage(Image) { ScaleX = Sizes.GetleftScaleFactor(), ScaleY = Sizes.GetTopScaleFactor() });
block.Children.Add(content);
render.Render(block);
}
My problem exists with block.Style.Top/block.Style.Left. If I set both of these to 0 the image doesn't show at all. If I set EITHER one of them to 0.01f the image appears, but it has a very faint white line against whichever side is 0.01f.
Why can't I use 0 for both without the image not showing? My scaling is correct (confirmed with multiple images and by calculating by hand).