Hi
I would like to use the obj-format_text method to insert text in a PDF-document. Some of the textstrings have leading spaces (hex 20), but hven the text is inserted, the leading spaces disappears 😢
data test;
text = ' With spaces'; output;
text = 'Without spaces '; output;
run;
ods _all_ close;
ods pdf file = "e:\Test.pdf";
data _null_;
set test;
if _n_ = 1 then declare odsout obj();
obj.format_text(data: text,
format: '$char25.',
style_attr: 'font_size=6pt font=(courier)');
run;
ods pdf close;
What to do, if I want to keep the leading spaces in the PDF-file ?
This is what happens, at not what I want....
?
Regards
Jens Vestergård
LB Forsikring
I think this is caused by the horizontal justification of the FORMAT_TEXT Method, which is Just : 'L' (left align) by default.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.