Welcome Guest Search | Active Topics | Sign In | Register

Setting top/left to 0 on block Options
Dfects
Posted: Friday, May 3, 2013 12:22:59 PM
Rank: Newbie
Groups: Member

Joined: 5/2/2013
Posts: 8
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).

eo_support
Posted: Friday, May 3, 2013 5:24:02 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

We have not been able to reproduce the problem. Can you try to isolate the problem into a test project and send the test project to us? Once we have that we will be able to debug it here to see what we can find. We will PM you as to where to send the test project.

Thanks!
Dfects
Posted: Tuesday, May 7, 2013 11:20:45 AM
Rank: Newbie
Groups: Member

Joined: 5/2/2013
Posts: 8
I've sent through a sample app. Thanks!
eo_support
Posted: Tuesday, May 7, 2013 5:27:20 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

We have found the problem and posted a new build that should fix the problem. Please see your email for the download location.

Thanks!
Dfects
Posted: Thursday, May 9, 2013 4:10:50 AM
Rank: Newbie
Groups: Member

Joined: 5/2/2013
Posts: 8
Seems to be working well! Thanks :)


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.