Skip to end of metadata
Go to start of metadata

Description

Twips are the units of measurement used by the WordWriter API. A single twip represents 1/1440 of an inch. TwipsConverter is a utility class that converts between twips and other units of measurement.

C#
 public static class TwipsConverter
vb.net
Public Shared Class TwipsConverter

Examples

C#

          WordApplication wwApp = new WordApplication();
          Document doc = wwApp.Create();
          Section section = doc.CreateSectionAfter();
          section.PageWidth = TwipsConverter.FromInches(8.5);
          section.PageHeight = TwipsConverter.FromInches(11);
        
vb.net

          Dim wwApp As New WordApplication()
          Dim doc As Document = wwApp.Create()
          Dim section As Section = doc.CreateSectionAfter()
          section.PageWidth = TwipsConverter.FromInches(8.5)
          section.PageHeight = TwipsConverter.FromInches(11)
        

Methods

Name

Description

FromCentimeters(Double)

Converts centimeters to twips. A twip is 1/567 of a centimeter.

FromInches(Double)

Converts inches to twips. A twip is 1/1440 of an inch.

FromPoints(Double)

Converts points to twips. 1 point = 1/72 inch = 20 twips.
1 inch = 72 points = 1440 twips

ToCentimeters(Int32)

Converts twips to centimeters. A twip is 1/1440 of an inch and 1/567 of a centimeter.

ToInches(Int32)

Converts twips to inches. A twip is 1/1440 of an inch.

ToPoints(Int32)

Converts twips to points. A twip is 1/1440 of an inch and a point is 1/72 of an inch.
  • No labels