Usage Note 24492: When I use J= on my TITLE, the text is wrapping - why?
When multiple J= options are used on a TITLE or FOOTNOTE statement, in the RTF and PDF destinations, the space for this TITLE or FOOTNOTE is divided into equal parts. For example, if all 3 possible J= options are specified, each J= text portion is allotted one third of the width of the page, minus the left and right margin settings. If 2 J= options are specified, each portion will be allocated one half the width of the page, minus the left and right margins. If one portion of the TITLE or FOOTNOTE takes up more than its allotment of the space, the text will wrap.
One workaround is to reduce the font size for the text. Another workaround is to separate the text into multiple TITLEs or FOOTNOTEs. In the FULL CODE tab, a workaround is offered using the CELLWIDTH style attribute for the PRINTER (PCL/PDF/PS) destinations only.
Problem code:
ods rtf file="file.rtf";
ods pdf file="file.pdf";
title j=l 'SOME TEXT' j=c 'LONG AND DESCRIPTIVE TEXT' ;
proc print data=sashelp.class;
run;
ods _all_ close;
Workaround 1:
ods escapechar="^";
ods rtf file="fix1.rtf";
ods pdf file="fix1.pdf";
title j=l '^S={font_size=11pt} SOME TEXT' j=c '^S={font_size=11pt}LONG AND DESCRIPTIVE TEXT' ;
proc print data=sashelp.class;
run;
ods _all_ close;
Workaround 2:
ods rtf file="fix2.rtf";
ods pdf file="fix2.pdf";
title j=l 'SOME TEXT' ;
title2 j=c 'LONG AND DESCRIPTIVE TEXT';
proc print data=sashelp.class;
run;
ods _all_ close;
Operating System and Release Information
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
The sample code uses the CELLWIDTH style attribute to request more than 50% of the width of the footnote. This logic is applicable in the ODS PRINTER dstinations, ODS PCL, ODS PDF and ODS PS.
ods escapechar='^';
options nodate nonumber orientation=portrait;
ods pdf file="c:\wrap.pdf" notoc;
title "Problem";
footnote j=l "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" j=r "YYYYYYYYYYYYYYYYY";
proc report data=sashelp.class nowd;
run;
title "Solution";
footnote j=l "^S={cellwidth=5.5in}XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" j=r "YYYYYYYYYYYYYYYYY";
proc report data=sashelp.class nowd;
run;
ods _all_ close;
| Type: | Usage Note |
| Priority: | low |
| Topic: | Third Party ==> Output ==> RTF SAS Reference ==> ODS (Output Delivery System) System Administration ==> Printing Third Party ==> Output ==> PDF
|
| Date Modified: | 2012-02-08 15:17:10 |
| Date Created: | 2006-02-22 10:11:11 |