Setting page characteristics

A page description describes the media and page metrics for every page in a printable folio. You can use TStandardPageDescription for almost any page description requirement. TStandardPageDescription provides member functions that allow you to set page characteristics including the print media, size, orientation, and margins.

Setting the physical page size

    You can use the constants defined in TPageDescription to set standard page sizes.
      // Create a page description with a custom page size
      TStandardPageDescription    pageDescription(kCustom,
      TGRect(TGPoint(0,0),TGPoint(298.370))); //Change the physical rectangle to tabloid size (11 x 17) pageDescription.SetPhysicalRect(TPageDescription::kTabloid);

Setting the printable rectangle

Setting the active rectangle

Setting page orientation

    To set the page orientation to landscape, call TStandardPageDescription::SetWide on your page description.
      // Create a page description for a legal-size page
      TStandardPageDescription    pageDescription(kLegal, TPageDescription::kUSLegal);
      // Set the page orientation to portrait
      sample.SetNarrow();
      // Set the page orientation to landscape
      pageDescription.SetWide();

Setting the print media


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker