Message-ID: <1206168474.8533.1711648686506.JavaMail.web05$@web05> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_8532_30481780.1711648686506" ------=_Part_8532_30481780.1711648686506 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html TwipsConverter

TwipsConverter

Description

=20

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.

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

Examples

=20
C#
=20

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

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

Methods

=20
=20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20 =20

Name

Description

FromCentimeters(Double)

Converts centimeters to twips. A twip is 1/567 o= f a centimeter.

FromInches(Double)

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

FromPoints(Double)

Converts points to twips. 1 point =3D 1/72 inch = =3D 20 twips.
1 inch =3D 72 points =3D 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.
------=_Part_8532_30481780.1711648686506--