The SAS Output Delivery System and reporting techniques

Style a Title in ODS PDF

Reply
Grand Advisor
Posts: 16,382

Style a Title in ODS PDF

I'm creating headers and footers in my PDF document using title and footnote statements, with a style=Journal applied.

Is there a way to style the title/footnotes inline so that they're not bold and italic?

Otherwise I'm assuming I need to change the template?

ods escapechar="^";

options nodate nonumber topmargin=1in bottommargin=1in leftmargin=1in rightmargin=1in;

ods listing close;

ods pdf file="C:\temp\sample.pdf"

    startpage=never style=journal notoc ;

title j=l "^{style [fontsize=9pt]Part1 of header}" j=r "^{style [fontsize=9pt ]Part2 of header}";

title2 "^{style [just=l fontsize=9pt  ] Part3 of header}";

footnote "^{style [just=l fontsize=9pt ] ^{unicode 00A9} REEZA}";

proc print data=sashelp.class;

run;

ods pdf close;

Grand Advisor
Posts: 9,748

Re: Style a Title in ODS PDF

You may not need to dig into the style elements and escape sequences quite so much.

From the online help example the following does all kinds of things with titles and they work when I create a PDF.

title1 "This is TITLE1" height=4;

title3 underlin=1

       "TITLE3 Is"

       color=red

       " Underlined";

title5 color=red

       angle=-90

       "TITLE5 is Angled -90";

title7 color=red

       rotate=25

       "TITLE7 is Rotated";

title8 color=green

       box=1

       "TITLE8 is Boxed";

title9 color=red

       box=3

       blank=yes

       bcolor=red

       color=blue

       angle=-25

       "TITLE9 is Angled in a Red Box";

title10 color=red

        box=1

        bcolor=blue

        move=(10,14)

        font=script

        "TITLE10 is in Script and "

        move=(10,10)

        height=2

        "is Partially Boxed, Positioned"

        move=(10,8)

        height=2

        "with Explicit Moves, and Overlaid by TITLE9";

   /* define footnote */

footnote justify=right "GTIENTI1 ";

/* display titles and footnote */

proc gslide;

run;

Post a Question
Discussion Stats
  • 1 reply
  • 179 views
  • 0 likes
  • 2 in conversation