Lasso Soft Inc. > Home

[PDF_Text]

Creates a text object to be added to a [PDF_Doc] variable. Requires the text string to be added to the PDF document as the first parameter. Optional parameters are listed below.

  • Syntax
  • Parameters
[Var:'Variable Name'=(PDF_Text: 'Text String', -Font=PDF_Font Variable)]
Optional Parameters
-Type Specifies the text type. This can be 'Chunk', 'Phrase', or 'Paragraph'. Different parameters are available for each of these types, as described below. Defaults to the 'Paragraph' type if no -Type parameter is specified. Optional.
-Color Sets the font color. Requires a hex color string as a parameter (e.g '#550000'). Defaults to '#000000' if not used. Optional.
-BackgroundColor Sets the text background color. Require a hex color string as a parameter (e.g '#550000'). Optional.
-Underline Keyword parameter underlines the text. Requires a boolean value of 'true' to work. Optional.
-TextRise Sets the baseline shift for superscript. Requires a decimal value that specifies the text rise in points. Optional.
-Font Sets the font for the specified text. The value is a [PDF_Font] variable, which is described in the Using Fonts section of this chapter. The font defaults to the current inherited font if no -Font parameter is specified.
-Anchor Links the specified text to a URL. The value of the parameter is the URL string (e.g. 'http://www.example.com'). Optional.
-Name Sets the name of an anchor destination within a page. The value of the parameter is the anchor name (e.g. 'Name' ). Optional.
-GoTo Links the specified text to a local anchor destination to go to. The value of the parameter is the local anchor name (e.g. 'Name'). Optional.
-File Links the specified text to a PDF document. The value of the parameter is a PDF file name (e.g. 'Somefile.pdf'). The -Goto parameter can be used concurrently to specify an anchor name within the destination document. Optional.
-Leading Sets the paragraph leading space in points (the space above and below the text), and requires a decimal value. For 'Phrase' and 'Paragraph' types only.
-Align Sets the alignment of the text in the page ('Left', 'Center', or 'Right'). Optional.
-IndentLeft Sets the left indent of the text object. Requires a decimal value which is the number of points to indent the text. Optional. Available for 'Paragraph' types only.
-IndentRight Sets the right indent of the text object. Requires a decimal value which is the number of points to indent the text. Optional. Available for 'Paragraph' types only.
Examples

To add a chunk of text:

Use the [PDF_Text] tag with the -Type='Chunk' parameter. The following example adds the text Blue World to the [PDF_Doc] variable with a predefined font. The text is positioned in the top left corner of the page by default.

[Var:'Text'=(PDF_Text:'Blue World', -Type='Chunk', -Font=$MyFont)]
[$MyFile->(Add: $Text)]

To add a paragraph of text:

Use the [PDF_Text] tag with the -Type='Paragraph' parameter. The following example adds three sentences of text to the [PDF_Doc] variable with a predefined font.

[Var:'Text'=(PDF_Text:'The mysterious file cabinet in orbit has been successfully lassoed. The file cabinent had been traveling at a velocity of 300 meters per second. Top scientists suspect that the cabinet had been in orbit for some time.', -Type='Paragraph', -Font=$MyFont, -Leading=10.0, -IndentLeft=20.0)]

To add a linked phrase:

Use the [PDF_Text] tag with the -Anchor parameter. The following example adds the text Click here to go somewhere to the [PDF_Doc] variable with a predefined font, and links the phrase to http://www.example.com.

[Var:'Text'=(PDF_Text:'Click here to go somewhere', -Type='Chunk', -Font=$MyFont,-Anchor='http://www.example.com')]
[$MyFile->(Add: $Text, -Left=100.0, -Top=100.0)]
Tag Link [PDF_Text] Category PDF
Type Substitution Data Source Any
Support Preferred Version 7.0
Output Type PDF_Text Security Tag
Implementation Sets Lasso 7.0

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft