Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
425
Adjust printing margin and header/footer
posted

Hi,

      I'm trying to print a UltraGrid by using UltraPrintPreviewDialog and UltraGridPrintDocument, but I can't seem to find how to control the print out page's margin.  Currently in the print preview dialog, there are a big blank space reserved on the page above the actual content; is there anyway to adjust that?  Also, is there anyway to add header and footer on the final print out?  Thanks!

P.S. - I've tried setting doc->Header->Height = 0 and doc->Page->Margins->Top = 0, but it still has a big margin on top of the grid.

Parents
No Data
Reply
  • 54937
    Offline posted

    The PrintDocument class has a DefaultPageSettings which has a Margins property which determines the print margins for the page. The UltraGridPrintDocument is just a derived PrintDocument so it has this same property.

    I'm not sure what you mean about adding header/footer on the "final print out". Are you saying that you want the print preview and print to look different? There is only 1 print document used for both so the settings will affect both.

Children