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;
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.
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';
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.