BookmarkSubscribeRSS Feed
mpajoh
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";
This:
title "this is the" "09"x " title, which" "09"x " is a test";
does not work.

What is the correct way.

Masoud
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
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:
[pre]
This is the title which is a test
[/pre]
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.

cynthia
[pre]
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);
run;

proc print data=sashelp.shoes(obs=5);
run;

ods pdf close;
[/pre]
mpajoh
Fluorite | Level 6
Thanks for the help.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 3390 views
  • 1 like
  • 2 in conversation