PAGEONE: { #---> Write Text ( parameters, Text ) - also does paragraphs #------------------------------------------------------------> writeText( '\par \f0 \fs20 \cf0\b', "Company Name: $CompanyName", ); lineBreak(); my @tableProp2 = ( widths => [inches(4), inches(4)], #--> width of each column align => 'l l ', ); my @tableProp2b = ( widths => [inches(4), inches(4)], #--> width of each column align => 'l l ', ); my $oDecl2 = RTF::Writer::TableRowDecl->new(@tableProp2,); $oDecl2->add_bgcolors(8); # Adds background color using color hash $fh->row($oDecl2, \'\fs20\b\cf5 rtf Desktop Manager', "Price"); my $oDecl2 = RTF::Writer::TableRowDecl->new(@tableProp2b,); $oDecl2->add_bgcolors(5); # Adds background color using color hash $fh->row($oDecl2, \'\fs20\b Software Services (Month to Month)', ""); $fh->row($oDecl2, \'\fs20 Asset Discovery (AD)', "0.45"); $fh->row($oDecl2, \'\fs20 Asset Management (price/seat/month)', "0.45"); $fh->row($oDecl2, \'\fs20 Software Distribution (price/seat/month)', "0.45"); $fh->row($oDecl2, \'\fs20 Patch Management (price/seat/month)', "0.45"); $fh->row($oDecl2, \'\fs20 Virus Protection (price/seat/month)', "0.45"); $fh->row($oDecl2, \'\fs20 On-line Backup 5 GB (price/seat/month)', "0.45"); $fh->row($oDecl2, \'\fs20 On-line Each Additional 5 GB (price/seat/month)', "0.45"); $fh->row($oDecl2, \'\fs20 Remote Control (price/seat/month)', "0.45"); $fh->row($oDecl2, \'\fs20 Data Encryption', "0.45"); $fh->row($oDecl2, \'\fs20 ', ""); $fh->row($oDecl2, \'\fs20\b Software Service Bundles', ""); $fh->row($oDecl2, \'\fs20 Management Suite (Asset Discovery and Asset Management) (price/seat/month)', "0.45"); $fh->row($oDecl2, \'\fs20 Compliance (Asset Discovery & Asset Management & Software Distribution) (price/seat/month)', "0.45"); $fh->row($oDecl2, \'\fs20 Productivity (Asset Discovery & Asset Management & Software Distribution & Patch Management) (price/seat/month)', "0.45"); $fh->row($oDecl2, \'\fs20 ', ""); $fh->row($oDecl2, \'\fs20\b Software Services (12 month)', ""); $fh->row($oDecl2, \'\fs20 Asset Discovery (price/seat/12 month)', "0.45"); $fh->row($oDecl2, \'\fs20 Asset Management (price/seat/12 month)', "0.45"); $fh->row($oDecl2, \'\fs20 Software Distribution (price/seat/12 month)', "0.45"); $fh->row($oDecl2, \'\fs20 Patch Management (price/seat/12 month)', "0.45"); $fh->row($oDecl2, \'\fs20 Virus Protection (price/seat/12 month)', "0.45"); $fh->row($oDecl2, \'\fs20 On-line Backup 5 GB (price/seat/12 month)', "0.45"); $fh->row($oDecl2, \'\fs20 On-line Backup Additional 5 GB (price/seat/12 month)', "0.45"); $fh->row($oDecl2, \'\fs20 Remote Control (price/seat/12 month)', "0.45"); $fh->row($oDecl2, \'\fs20 Data Encryption', "0.45"); $fh->row($oDecl2, \'\fs20 ', ""); $fh->row($oDecl2, \'\fs20\b Software Service Bundles (12 month)', ""); $fh->row($oDecl2, \'\fs20 Management Suite (Asset Discovery & Asset Management) (price/seat/12 month)', "0.45"); $fh->row($oDecl2, \'\fs20 Compliance (Asset Discovery & Asset Management & Software Distribution) (price/seat/12 month)', "0.45"); $fh->row($oDecl2, \'\fs20 Productivity (Asset Discovery & Asset Management & Software Distribution & Patch Management) (price/seat/12 month)', "0.45"); } FOOTER: { my $sFooterHead = qq{\\pard\\ql\\plain\\f0\\fs18\\'a9}; my $sFooterTail = qq/\\par}/; $fh->print(\qq'{\\footer $sFooterHead', " Copyright 2001-2007 Alinean, Inc. and rtf Marketing, L.P. \t\t\t\t Page ", \q'\chpgn', \$sFooterTail, ); } # end of FOOTER block $fh->print(\$RTF_obj); $fh->close(); #-------------------------------------------------------------------------------------------------------------------------------------------------# #------------------------------------------------------------- FUNCTIONS -------------------------------------------------------------------------# #--> line breaks pass number of lines #--------------------------------------> sub lineBreak{ my $line = q'\par'; $fh->print(\$line); } #--> Creat Table #----------------> sub newtable(){ my(@tableProp, $tableColor, @localData) = @_; my $decl = RTF::Writer::TableRowDecl->new(@tableProp,); $decl->add_bgcolors($tableColor); $fh->row($decl, @$_) for @localData; } #--> Make image #---------------> sub newImage(){ $fh->paragraph( $fh->image( 'filename' => $_[0], ), ); } #--> Inches from twips #----------------------> sub inches{ my ($inches) = @_; my $twips = 1440; $inches = ($inches * $twips); return $inches; } #--> Write text Function #-----------------------> sub writeText(){ my($rtfFormat, $writeText) = @_; $fh->paragraph( \$rtfFormat, # 12pt, bold, italic "$writeText" ); } __END__