BookmarkSubscribeRSS Feed
Norman21
Lapis Lazuli | Level 10

Hi,

 

I'm trying to write a report as a PDF that includes a Greek character (mu) for microgram. All looks well in the output window, but when the PDF is generated things get messy.

 

Here is some code to describe what I'm talking about:

 

 

data medication;

length drug $25;

input patient $ drug $ route dose units;

datalines;

GWa Aripiprazole 3 9.75 1

JAd Adalimumab 2 40 1

TJe Esomeprazole 1 40 1

JMa Rosuvastatin 1 10 1

JMo Etanercept 2 50 1

JQA Salmeterol 5 50 4

AJa Infliximab 4 100 1

MVB Insulin 2 10 5

WHH Filgrastim 2 15 4

JTy Glatiramer 2 20 1

JKP Rituximab 4 50 1

ZTa Tiotropium 5 18 4

MFi Sitagliptin 1 25 1

;

proc format;

value unit

1 = 'mg'

2 = 'g'

3 = 'ml'

4 = '~{unicode 03BC}g'

5 = 'other'

;

value route

1 = 'oral'

2 = 'subcu'

3 = 'IM'

4 = 'IV'

5 = 'inhaled'

6 = 'nasal'

7 = 'transdermal'

8 = 'eye'

9 = 'other'

;

run;

ods pdf

author = "POTUS"

title = "Report of Medications"

style=Pearl

pdftoc = 1

uniform

/* file="C:\Users\XXX\GreekTest.pdf" */

;

options orientation=portrait nonumber nodate missing='' ;

options dtreset;

ods listing close;

ods escapechar='~';

title j=c "Table of Medications ";

proc report data=medication nowd headline headskip formchar (2)="_" spacing=2 split='|' style(report)=[fontsize=8pt] ;

column

patient

drug

dose

units

route

;

define patient / order style(column)= [ cellwidth=2.5cm] "Patient Identifier";

define drug / style(column)= [just=left cellwidth=3.5cm] "Medication";

define dose / style(column)= [just=center cellwidth=2.2cm] "Dose" ;

define units / style(column)= [just=left cellwidth=2.2cm] "Units" format=unit.;

define route / style(column)= [just=right cellwidth=2.2cm] "Route" format=route.;

run;

 

Here is the view of the table from the output window:

 

OutputTable.PNG

 

And here is the table in the PDF:

 

PDFTable.PNG

 

Why are the units no longer aligned?

 

SAS v9.4 running in Windows 7 x64

 

Norman.

Norman.
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation

2 REPLIES 2
Reeza
Super User

Is it your PDF viewer? I'm assuming Adobe, it doesn't always play nicely with symbols, there's something about embedding fonts I had to deal with once for something like this. 

Norman21
Lapis Lazuli | Level 10

Interesting idea, but how do I test it?

 

I've attached the file.

 

Norman.

Norman.
SAS 9.4 (TS1M6) X64_10PRO WIN 10.0.17763 Workstation

sas-innovate-2024.png

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.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 956 views
  • 0 likes
  • 2 in conversation