[C1PrintDocument1] how to know the CurrentY like vsPrinter.CurrentY

Posted by: active_gaowei on 3 August 2018, 5:04 pm EST

  • Posted 3 August 2018, 5:04 pm EST

    after rendered a object, I want to the exact position(Y) of the next render object, to decide whether create new page or just continue in the same page.
    but how to know the exact position(Y) ? I only got the 'auto' value with RenderObject.Y and I can not know the exact position, of course I could not compare it with page height .

    in VB6(VsView) we could got it by vsPrinter.CurrentY. but in VB.NET(C1PrintDocument1) I can't find the same property .
  • Marked as Answer

    Replied 5 August 2018, 8:46 pm EST


    The Y point for an object rendered through C1PrintDocument can be obtained using this code:
     Dim yval As Integer = CType(c1PrintDocument1.Body.Children(1).Y,Integer)

    Likewise, for the current object, you can use any of the properties shown in the screenshot below and then obtain the corresponding Y point.

    Unfortunately, there is no other way to do so.
    Hope it helps.

    Best Regards,
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels