The SAS Output Delivery System and reporting techniques

ods pdf titles

Reply
N/A
Posts: 0

ods pdf titles

Is there a way to automatically wrap titles onto the next line?
In my reports, it tends to resize the size of the titles between pages in order to fit on one line. Is there a way to enable wraparound text, or just run it, and add a second title line if necessary?
SAS Super FREQ
Posts: 8,864

Re: ods pdf titles

Posted in reply to deleted_user
Through the use of ODS ESCAPECHAR, you can insert an explicit line break into a title or footnote of ODS output. For example, if you define the escape character as a tilde (~), then the escape character sequence '~n' when inserted into the title would produce an explicit line break. A complete program that illustrates the behavior is shown below: [pre]

options orientation=portrait center;
ods pdf file='split_title.pdf';
ods escapechar='~';

title 'This is a Title ~n With a Line Break';
proc print data=sashelp.shoes(obs=100);
var region product sales;
run;
ods pdf close;[/pre]

cynthia
N/A
Posts: 0

Re: ods pdf titles

Posted in reply to deleted_user
Thanks!
So, this will hardcode it in.. but is there a way that it will automatically wrap the line, rather than change the font size if the title happens to be too long?
SAS Super FREQ
Posts: 8,864

Re: ods pdf titles

Posted in reply to deleted_user
I don't understand what's happening in your Acrobat to the ODS PDF file. My title font size NEVER changes spontaneously or appears to when I open a PDF file. Your best bet for figuring this out may be to contact Tech Support.
cynthia
N/A
Posts: 0

Re: ods pdf titles

Posted in reply to deleted_user
I have a multiple (60 page report) all with the same template, etc.
When I run it, some titles fit fine, others (long ones) get resized automatically because they wont fit..
I get this message:

WARNING: TITLE1 is too long. Height has been reduced to 77.34 pct of specified or default size.

So, it automatically reduces the height to make the text smaller, and the title shorter.
It's not a big deal, but I would prefer the option to wrap to the next line rather than make the text smaller.

Thanks!!
SAS Super FREQ
Posts: 8,864

Re: ods pdf titles

Posted in reply to deleted_user
Are you using SAS/Graph? I only get the TITLE1 reduced message if I have a long title being used within a SAS/Graph procedure. You could try deleting the title from the SAS/Graph procedure and using ODS PDF TEXT= to insert text strings -- sort of pseudo titles into the output. Again, Tech Support could help you with this.
cynthia
SAS Employee
Posts: 50

Re: ods pdf titles

Posted in reply to deleted_user
I would love to see a small snippet of code showing this problem. Perhaps I can find a workaround for you. Please email me at ods@.sas.com

Scott
Ask a Question
Discussion stats
  • 6 replies
  • 222 views
  • 0 likes
  • 3 in conversation