[Apologies for the cross-posting, I posted this to the wrong community yesterday]
I'm using ODS PDF Text to create some standard reports. When I put a change in style in the middle of a text line (e.g. to italicize a word), extra spaces are inserted in front of the italicized word. After some experimentation, I found that this only happens when the text line is reasonably long (I didn't do enough experimentation to determine the exact length of text that would invoke the problem. For example:
The following works correctly:
pdf text="^S={font_face=calibri font_size=11pt }regular^S={font_face=calibri font_size=11pt font_style=italic} italic^S={font_face=calibri font_size=11pt} regular.";
It produces: regular italic regular
But when the text line is long:
pdf text="^S={font_face=calibri font_size=11pt }Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua ipsum dolor sit amet, consectetur adipiscing elit^S={font_face=calibri font_size=11pt font_style=italic} italic^S={font_face=calibri font_size=11pt} Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua ipsum dolor sit amet, consectetur adipiscing elit.";
It produces: Lorem ipsum etc. italic Lorem ipsum etc. [note there are two extra spaces in front of the word "italic"]
I have tried breaking the long text line up into multiple lines in the editor, and I've tried assigning all of the various pieces to macro variables so that the "pdf text" line looks like: pdf text="®&pt1&itl&pt2®&pt3"; but the result is the same (extra blank spaces).
I would like to think that I've looked everywhere for a solution... but I'm sure I've missed something. Anybody have any clues?
thanks!
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!
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.