BookmarkSubscribeRSS Feed
Fluorite | Level 6
I am writing a PDF file.
I like to have a TAB character inserted several places like:
title "this is the" TAB " title, which" Tab " is a test";
title "this is the" "09"x " title, which" "09"x " is a test";
does not work.

What is the correct way.

A PDF file is a document that contains your output --as it would be sent directly to a printer. Word processors generally recognize the TAB character. A PDF file is not a word processing document. You can build a PDF file -from- a word processing document if you have the right Adobe plug-in for your word processor.

However, while Word or Excel might recognize the '09'x as a TAB character, I do not believe that ODS PDF will use a TAB character or recognize one.

If you do want to space your title so that you have output like this:
This is the title which is a test
across the top of your ODS output, you can use TITLE and FOOTNOTE controls to left, center or right-justify text strings. The program below has an example of how to do this. (The technique works for most destinations, like RTF and HTML and PDF.) The example also shows the use of ODS ESCAPECHAR to insert page X of Y page numbering in the title or the footnote of a PDF document.

options nodate nonumber;
ods listing close;
ods escapechar='^';
ods pdf file='c:\temp\showtitle.pdf';

title j=l 'This is the' j=c 'title, which' j=r 'is a test';
title2 j=l h=20pt 'BIG' j=c h=10pt 'MEDIUM' j=r h=6pt 'SMALL';
title3 j=l color=green 'Green' j=c color=cyan 'Cyan' j=r c=purple 'Purple';
title4 j=l 'Study 123' j=r "Produced: &sysdate9";
title5 j=r 'Page ^{thispage} of ^{lastpage}';
footnote j=l f='Courier New' h=12pt 'The purpose of this footnote is to show how to left justify text';
footnote2 j=c '-^{thispage}-';
footnote3 j=r 'Something else';
footnote4 j=l 'Left' j=c 'Center' j=r 'Right';

proc print data=sashelp.class(obs=3);

proc print;

ods pdf close;
Fluorite | Level 6
Thanks for the help.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1 like
  • 2 in conversation