GetTextFormattingInfo(base, lxf_data, width, height);
Enables splitting of LXF text into separate areas, for example to create multi-column output. The LXF text must be comply with the Advanced Text functionality in PageOUT.
$file = "data/overlays/fragment.lxf";
// load the LXF fragment into variable
$err = FileOpen( $file, "r" );
$part = 0;
if(num($err) = 0)
{
$lxf = "";
$line = "";
while( 0 = FileReadLn( $file, $line ) )
{
$lxf = $lxf + $line;
$lxf = $lxf + "<0D><0A>";
}
FileClose( $file );
$test_width = 50;
$test_height = 60;
// write test output, original
$filename = "data/overlays/fragment.part." + $part + ".lxf";
fileopen($filename, "wb" );
filewrite($filename,$lxf);
fileclose($filename);
$part++;
GetTextFormattingInfo( "test", $lxf, $test_width, $test_height );
// write test output, part 1
$testfile = "data/overlays/fragment.part." + $part + ".lxf";
fileopen($testfile, "wb" );
filewrite($testfile,$test_text);
fileclose($testfile);
$part++;
//write test output, part 2
$testfile = "data/overlays/fragment.part." + $part + ".lxf";
fileopen($testfile, "wb" );
filewrite($testfile,$test_next);
fileclose($testfile);
$part++;
log(0, "variable: test_width: " + $test_width );
log(0, "variable: test_height: " + $test_height );
log(0, "variable: test_rows: " + $test_rows );
log(0, " " );
log(0, "variable: test_next_width: " + $test_next_width );
log(0, "variable: test_next_height: " + $test_next_height );
log(0, "variable: test_next_rows: " + $test_next_rows );
fileclose( $file );
}
else
{ $errtext=ioerrtext($err);
log(0,"Could not open " + $file + ": " + $errtext);
}