BookmarkSubscribeRSS Feed
Niugg2010
Obsidian | Level 7

I want to control pdf output page width and column width. Why does the output look so bad (please see below). However if output is rtf there is no issue.

 

please advise. Thanks.

 

data x;

set sashelp.asscmgr;

if _n_<20;

run;

%let exf=pdf;

ods &exf. file="C:\Users\....\try.&exf.";

proc report data=x style(report)=[width=7.5in];

 

column clasname objname defcredt defmonddt id ldesc;

define clasname / style=[cellwidth=10%];

define objname / style=[cellwidth=10%];

define defcredt / style=[cellwidth=10%];

define defmonddt / style=[cellwidth=10%];

define id / style=[cellwidth=10%];

define ldesc / style=[cellwidth=50%];

run;

 

ods &exf. close;

Capture.JPG

2 REPLIES 2
Cynthia_sas
Diamond | Level 26

Hi:

  PDF is not "happy" if you try to over-control the width as you show. I find that if I simplify your code and only specify the overall width and make sure that the margins are set, then both RTF and PDF produce nice looking output:

not_overcontrol_width.png

 

If you want more "real estate" for displaying long text fields, you might consider landscape orientation.

 

Hope this helps,

Cynthia

 

Niugg2010
Obsidian | Level 7

Cynthia,

 

    Thanks a lot.

 

George

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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
  • 935 views
  • 0 likes
  • 2 in conversation