Unexpected word wrap in pdf vs. rtf

Reply
Occasional Contributor
Posts: 9

Unexpected word wrap in pdf vs. rtf

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!

Occasional Contributor
Posts: 9

Re: Unexpected word wrap in pdf vs. rtf

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!

Super User
Posts: 10,538

Re: Unexpected word wrap in pdf vs. rtf

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".

Occasional Contributor
Posts: 9

Re: Unexpected word wrap in pdf vs. rtf

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.

Ask a Question
Discussion stats
  • 3 replies
  • 558 views
  • 3 likes
  • 2 in conversation