BookmarkSubscribeRSS Feed
scb
Obsidian | Level 7 scb
Obsidian | Level 7

I would like to put ABC appear same as LINE13 vertically, but I just could not get it. Anyone can help? Thanks.

 

 

ods pdf file='d:\odstest.pdf';

ods escapechar='^';

 

proc report data=sashelp.class(obs=1) nowd;

  compute after /style={just=l leftmargin=3in};

 endcomp;

run;

  

ods pdf text='^S={leftmargin=.75in}cde ^S={leftmargin=5.25in}ABC';

ods pdf text='^S={leftmargin=5.25in}LINE13';

 

ods pdf close;

2 REPLIES 2
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Why not put that information in the footnotes.  Almost all clinical outputs I have seen put code decodes and such like in footnotes.  Also, you will be better off creating an RTF file first, so you can use RTF markup, then convert to PDF.  Eg.

footnote "Page ^{thispage} of ^{lastpage}";

Never actually found a use for pdf text at all.

nehalsanghvi
Pyrite | Level 9

I don't think you can specify a margin twice. What you are trying to do is insert spaces between CDE and ABC such that ABC lines up with LINE13 on the next line.

 

This code does that by inserting 127 non-breaking spaces, but this is not a very good way to do it as you have to play around a lot to get the number of spaces just right and if you change the casing on the text or add/remove text before the spaces, you have to adjust the number of spaces again:

ods pdf text='^S={leftmargin=.75in}CDE ^{nbspace 127}ABC';
ods pdf text='^S={leftmargin=5.25in}LINE13';

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore 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
  • 2 replies
  • 1727 views
  • 0 likes
  • 3 in conversation