The SAS Output Delivery System and reporting techniques

text justification with in-line formatting in PDF

Reply
Contributor
Posts: 23

text justification with in-line formatting in PDF


Hi everyone,

I'm having a problem involving a spanning header. I want to produce a spanning header with "text1 text2" on the left side of the page, and then "text3" at the right side of the page.

Here's my COLUMNS statement:

COLUMNS ("~{style [fontstyle=italic just=l] text1} text2 ~{style [just=r] text 3}" c1 c2 c3 c4 c5);

It is left-justified, with text1 in italics and text2 in regular, but text3 follows immediately after As far as I can tell, the second JUST doesn't work. The in-line directive works (replace JUST=R with COLOR=RED and text3 turns red), but not with JUST. Is this a spanning header issue where the width of the table can't be determined in time to apply formatting?

Thanks,

Derek

SAS Super FREQ
Posts: 8,720

Re: text justification with in-line formatting in PDF

Hi:

  I think there are some attributes that PDF won't change in "midstream" or "mid-cell". You'd have to check with Tech Support to verify that. However, you could just split up the header so that text1 and text2 are above the first 3 columns and then text 3 is above the last 2 columns and if you split the spanning header into 2 cells, each cell can have different justification. See the attached screen shot. Program below.

  If that won't work with you, then I recommend that you work with Tech Support.

cynthia

ods pdf file='c:\temp\just.pdf' style=printer notoc;

ods escapechar='~';

  proc report data=sashelp.class nowd;

    COLUMNS ("~{style [fontstyle=italic just=l] text1 text2}" name age sex )

            ("~{style [just=r] text 3}"  height weight);

  run;

ods pdf close;

Attachment
Contributor
Posts: 23

Re: text justification with in-line formatting in PDF

Thank you, Cynthia. Hope y'all are safe and warm.

Ask a Question
Discussion stats
  • 2 replies
  • 396 views
  • 3 likes
  • 2 in conversation