- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
I need to generate a all text report using ods layout and ods text and I have a paragraph that needs to be justified on both sides. I tried 'just' option in inline formatting but I still can't get the exact output.
The desired output will be:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxbbbbbbbbbbbbb
aaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbb
baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaffffbnnnn
But the current output is:
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzfsssssssssssssssf
afaaaaaaaaaaaaaaaaaefbbbbbbbbbbbbbbtrrrrrrrrrrrrrrrrrrrrrrr
berrrrrrrrrrrrrrrrehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhnmm
Any thoughts is appreciated.
Thank you!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
You want "FULL" justification where the text is justified on both sides. However, if you look in the documentation for SAS Style capabilities: https://go.documentation.sas.com/?docsetId=odsug&docsetTarget=p0xi2cygmfk0wkn1ei625zq5r488.htm&docse... you'll see that JUST= or TEXTALIGN= only has Left, Right, Center or Dec.
Here's the screen shot from the doc:
So the best you can do is to post-process the text to change the justification in Word after the initial creation.
Cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Code you are attempting. Some actual data of what is being written.
And describe what justification as it really is not exactly clear to me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I attached a photo below to explain the current and desired output. Hopefully this would make sense. The current output is left justified by default and the desired output is justified on both sides.
The code I used is:
ods escapechar="^";
ods pdf file="….\test.pdf" ;
ods layout start X=0in y=0in ;
ods region x=0.8in y=1.3in;
ods text="^{style[fontsize=12pt font_face='Arial'] text here.}";
ods layout end;
ods pdf close;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
You want "FULL" justification where the text is justified on both sides. However, if you look in the documentation for SAS Style capabilities: https://go.documentation.sas.com/?docsetId=odsug&docsetTarget=p0xi2cygmfk0wkn1ei625zq5r488.htm&docse... you'll see that JUST= or TEXTALIGN= only has Left, Right, Center or Dec.
Here's the screen shot from the doc:
So the best you can do is to post-process the text to change the justification in Word after the initial creation.
Cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you Cynthia!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You may be able to use the escapechar RAW option to insert raw PDF tags to start and end justification but you'll have to dig through the PDF documentation to find them.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
He'd have to insert RAW tags into RTF or HTML and then make the PDF file from the RTF or HTML output.
The RAW escapechar function is not supported for PDF as shown in the doc: https://go.documentation.sas.com/?docsetId=odsug&docsetTarget=p11xia2ltavr8ln17srq8vn4rnqc.htm&docse...
Cynthia
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Cynthia_sas wrote:
He'd have to insert RAW tags into RTF or HTML and then make the PDF file from the RTF or HTML output.
The RAW escapechar function is not supported for PDF as shown in the doc: https://go.documentation.sas.com/?docsetId=odsug&docsetTarget=p11xia2ltavr8ln17srq8vn4rnqc.htm&docse...
Cynthia
Thanks @Cynthia_sas . My online help is throwing network errors today. I thought that might be the case but got sidetracked to figure out why my help isn't working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your help!