BookmarkSubscribeRSS Feed
MattR
Calcite | Level 5

I'm having an issue with word wrap when running the same report in both rtf and pdf formats. When I use ods rtf, it breaks between words as expected. For example:

Presidents

----------

George

Washington

Abraham

Lincoln

Franklin

Delano

Roosevelt

But when I use ods pdf, it automatically breaks within words to fit to the column width:

Presidents

----------

George Was

hington

Abraham Li

ncoln

Franklin D

elano Roos

evelt

which of course is not what I want. I can't fix it by changing the width of my columns, either, or they won't all fit on the report. Does anyone know if there's a way to fix the pdf output?

Thanks much!

3 REPLIES 3
MattR
Calcite | Level 5

Ok, may have already answered my own question. I had "asis=on" in my style data command. Removing this allowed the pdf text to wrap correctly, however I have no idea why. If anyone can tell me why that worked, I would greatly appreciate it!

ballardw
Super User

You don't say where you were using ASIS but it modifies the general rules for spaces in strings. My use for ASIS usually involves not supressing leading spaces in Proc Tabulate but I can see it also overriding a "if the next word won't fit in the space allowed on this line move it to the next line" to "print all the characters in the width of the column before moving to next line".

MattR
Calcite | Level 5

Thanks; that makes sense. It was used in a template under "style data" step, but I'm not sure why I would need it there since I wouldn't want leading spaces in my data, anyway. I think it will work to leave it out, though.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1457 views
  • 3 likes
  • 2 in conversation