The SAS Output Delivery System and reporting techniques

ODS PDF TEXT QUERY

Reply
Contributor scb
Contributor
Posts: 69

ODS PDF TEXT QUERY

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;

Super User
Super User
Posts: 7,997

Re: ODS PDF TEXT QUERY

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.

Frequent Contributor
Posts: 75

Re: ODS PDF TEXT QUERY

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';
Ask a Question
Discussion stats
  • 2 replies
  • 136 views
  • 0 likes
  • 3 in conversation