BookmarkSubscribeRSS Feed
Haris
Lapis Lazuli | Level 10

Is there a way to control vertical line spacing in ODS TEXT, PROC ODSTEXT, and PROC ODSLIST?

While outputting to ODS PDF, I am trying to replace line-by-line paragraph syntax:

ods text "Text for Line 1: Some long text to the end of the line 1 of the paragraph.";

ods text "Text for Line 2: Text for line 2 of the paragraph.";

... with this syntax:

ods text "Text for Line 1: Some long text to the end of the line 1 of the paragraph. Text for Line 2: Text for line 2 of the paragraph.";

In the code I am trying to improve, the paragraphs are entered one line at a time with manual line breaks.  The general idea is to eliminate manual line breaks to accommodate things like font changes and text edits of the future.  The approach works and automatic line breaks are inserted in the right places.  Trouble I am encountering is that the line spacing from a single ODS TEXT statement is much larger than the one for line-by-line syntax and the text no longer fits on one page.

I suspect that the reason for this is in the fact that the default font size for the template is 9pt.  Each line of the broken line-by-line paragraphs begins with a style statement that specifies font size of 12pt.  In other words, it appears that the font size for a line is 12pt but the font size in between the two ODS TEXT statements is only 9pt.  Hence the question, can I decrease/control the vertical line spacing within paragraphs?  Something like a style option VSpacing=9pt?  I can't seem to find any style elements like that.

Thanks,

Haris

1 REPLY 1
ballardw
Super User

I haven't played with the vertical spacing but I suspect that you may want to work with ODS PDF Text or ODS RTF Text and use some specific-to-destination coding with ESCAPECHAR to put in raw codes.

Also the style you are using may have an impact and changing styles might address the issue.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 2717 views
  • 0 likes
  • 2 in conversation