SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
yus03590
Calcite | Level 5

Hi, I've rendered an image in report writing interface in EG, but am unable to resize it according to my needs.  I adding "height=300pct" in the obj.image(overrides:"<stuff>") section, but the photo simply doesn't render, and no other parameters seem to have any effect on the scaling/size of the image.  There are few online resources on the subject and I was wondering if someone could help me resize the image. 

 

Here are the warnings:

 

WARNING: Unknown image scaling option: w
WARNING: Unknown image scaling option: h
WARNING: Unknown image scaling option: dpr
WARNING: Unknown image scaling option: cs
WARNING: Unknown image scaling option: h

 

Here's my code:

 

ods pdf file='/home/myDirectory/imagetest.pdf' notoc;

data _null_;
length pixloc $256;
if _n_ = 1 then do;
pixloc='https://images.pexels.com/photos/799443/pexels-photo-799443.jpeg?w=940&h=650&dpr=2&auto=compress&cs=...';
end;
if _n_ = 1 then do;
dcl odsout obj();
obj.layout_gridded(columns:1);
end;
obj.region(style_attr: "background=grey color=grey");
obj.image(file: pixloc ,
overrides:"just=left width=200pct");
if eof eq 1 then
obj.layout_end();
run;

ods pdf close;

1 REPLY 1
ballardw
Super User

Do you get any warning or such in your log? If so you might show the log results. Paste the log into a code box opened with the forum {I} icon to preserve formatting of the text.

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

Register now!

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
  • 1 reply
  • 845 views
  • 0 likes
  • 2 in conversation