开发者

Image location doesn't work if your page is Landscape in migradoc (pdfsharp)

开发者 https://www.devze.com 2023-01-21 16:06 出处:网络
i have the following code that works fine to put an image in the bottom left of the page (in portrait mode).once i change the page to landscape mode, the image goes off the screen.

i have the following code that works fine to put an image in the bottom left of the page (in portrait mode). once i change the page to landscape mode, the image goes off the screen.

how would i lay this out in landscape mode so it shows up on the bottom left of the screen. here is the code:

   Section section = document.AddSection();

  Image image2 = section.AddImage("../../back.png");
  image2.RelativeHorizontal = RelativeHorizontal.Page;
  image2.RelativeVertical = RelativeVertical.Page;
  image2.Left = ShapePosition.Left;
    image2.Top = ShapePosition.Bottom;
  image2.WrapFormat.Style = WrapStyle.Through;

if i change:

    image2.Top = ShapePosition.Bottom;

to

    image2.Top = ShapePosition.Top;

it shows up fin开发者_运维知识库e on the top left, but doesn't work on the bottom left. I can work around this by having

image2.Top = 550

but i would have thought ShapePosition.Bottom would work in landscape mode.


Sounds like a bug.

I've put it on our error list, but I don't have time now to investigate it.

Good for you that you found a workaround.

0

精彩评论

暂无评论...
验证码 换一张
取 消