See Also

Metrics Members

Description

The Metrics object is used to measure the size a text string required on a page.

For a list of all members defined in this module, see Metrics members.

Remarks

The Metrics object is useful if we want to add an element with the exact width or height of another page element or descending font value based on a font size.

Interfaces

Implemented InterfaceDescription
Object 

Example

[ASP - VBScript] 

<!-- METADATA TYPE="typelib" UUID="{DF9225FE-94A4-490D-8CAD-E8366CE621D3}"--> 
<% 
    ' Create a PDF Document 
    Dim MyDocument  
    Set MyDocument = Server.CreateObject( "DynamicPDF.Document" )  
    Dim MyDocTemplate 
    Set MyDocTemplate = MyDocument.SetEvenOddTemplate() 
    ' Create 3 Pages and add it to the document 
    MyDocument.AddPage() 
    MyDocument.AddPage() 
    MyDocument.AddPage() 
    Set MyLabel = MyDocTemplate.AddLabel( "Home of the DynamicPDF?", 50, 20, 180, 70 ) 
    MyLabel.TextColor = "4169E1" 
    MyLabel.UnderLine = True 
    ' Metrics object to match the link width same as Label    
    Dim MyLinkTwo 
    Set MyLinkTwo = MyDocTemplate.AddUrlLink( 50, 20, MyDocument.Metrics.GetTextWidth( MyLabel.Text, MyLabel.Font, MyLabel.FontSize ), 70, "www.cete.com" ) 
    ' Draw the PDF 
    MyDocument.DrawToWeb 
    Set MyDocument = Nothing     
%> 

See Also

Metrics Members

 

 


© Copyright 2007, ceTe Software