BookmarkSubscribeRSS Feed
ychen89
Calcite | Level 5

Hi all,

 

I'm working on some projects which need to output a lot of graphs to a single RTF file. Two years ago the output of similar stuff is only about 7.5 MB, but now it goes to 140 MB. All the settings are the same. 

 

Is there anyone know what happened to ODS RTF output that make the output file sooooo big?

 

Is there any way to reduce the size of the RTF file?

 

Thanks,

 

Ying

 

6 REPLIES 6
LeonidBatkhan
Lapis Lazuli | Level 10

Hi ychen89,

It could be because you are using a different image resolution. Check out this Controlling Image Resolution .

Try explicitly setting image_dpi, for example set it to

image_dpi=100

in your ODS statement.

Hope this helps.

 

ychen89
Calcite | Level 5

I tried that. It's not working. The file size stay the same.

ballardw
Super User

Something changed but it is hard to tell what. An upgrade to SAS could change the definition of an ODS Style. A change there could affect things without you "changing settings". Similarly if you are now using a different style that can affect the file size somewhat.

 

If you are primarily making graphs one item that can have a significant effect is the DPI (dots per inch) that are used when creating graphs.

If you want to reduce the file size you could try on the ODS RTF destination statement setting the IMAGE_DPI to a lower value. The default is typically 200 so using Image_dpi=100 should reduce the file size significantly.

 

Another possibility is if you changed the size of graphs. That increases file size, as would adding more graphs.

 

Since we do not have your settings from 2 years ago, your data or your code you get a sort of generic response.

 

 

 

ychen89
Calcite | Level 5

I tried that it's not working. The file size stays the same. 

 

The only size related setting is 

 

ods graphics on/ width=5.67in; *resizes all images;

 

other setting used in the old code which I keep are:

 

ods tagsets.sasreport13(id=EGSR) gtitle gfootnote;

 

ods rtf style=aeci_rpt nokeepn file="....Graphs.rtf";

 

The style is predefined. Only change the some default color. 

 

I even tried to use device=PNG, and the file size stay the same.

ballardw
Super User

@ychen89 wrote:

I tried that it's not working. The file size stays the same. 

 

The only size related setting is 

 

ods graphics on/ width=5.67in; *resizes all images;

 

other setting used in the old code which I keep are:

 

ods tagsets.sasreport13(id=EGSR) gtitle gfootnote;

 

ods rtf style=aeci_rpt nokeepn file="....Graphs.rtf";

 

The style is predefined. Only change the some default color. 

 

I even tried to use device=PNG, and the file size stay the same.


Show me where you set the Image_dpi that "did not work". And the LOG from when you ran that.

 

 

ychen89
Calcite | Level 5

code:

ods rtf style=aeci_rpt nokeepn image_dpi=100
file="\......Graphs.rtf";

 

Log:

244 ods rtf style=aeci_rpt nokeepn image_dpi=100
245 file="....... Graphs.rtf";
NOTE: Writing RTF Body file: ..........NC Graphs.rtf

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 6 replies
  • 1941 views
  • 0 likes
  • 3 in conversation