The SAS Output Delivery System and reporting techniques

Tab character and PDF

Reply
Occasional Contributor
Posts: 18

Tab character and PDF

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
SAS Super FREQ
Posts: 8,864

Re: Tab character and PDF

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]
Occasional Contributor
Posts: 18

Re: Tab character and PDF

Posted in reply to Cynthia_sas
Thanks for the help.
Ask a Question
Discussion stats
  • 2 replies
  • 1425 views
  • 1 like
  • 2 in conversation