in reply to Re^4: How to print a text document to RTF document
in thread How to print a text document to RTF document

See change-the-background-color

# chcbpatN - background pattern N $rtf->paragraph( \'\chcbpat4\cf3',"This is Blue on Orange" );
poj

Replies are listed 'Best First'.
Re^6: How to print a text document to RTF document
by mdavies23 (Acolyte) on Jul 11, 2017 at 16:07 UTC

    I am trying to get the background black, all the other ones work and when i put in chcbpat0 or chcbpatN it just gives me a white background

      Did you define 0

      'colors' => [ [0,0,0], # 0-black

        This isnt making sense to me... this is coming out black background and white lettering on one computer and on the other its exactly what i wanted.. Any idea why?

        $rtf->prolog( 'title' => "Color Test", 'colors' => [ undef, [0,0,0], [255,0,0], [0,255,0], [0,0,255], [255,128,0], [255,255,0], ], ); #PRINT ERRORS IN RED $rtf->printf( \'{\fs20\lang1036\noproof\cf2\chcbpa +t1 %s} \par ', "$_\n"); }