ODS and Base Reporting

Build reports by using ODS to create HTML, PDF, RTF, Excel, text reports and more!
BookmarkSubscribeRSS Feed
JacobC
Calcite | Level 5

Relatively new to SAS and having issues with resolution of PNG and JPG images when they are exported to PDF reports.

 

Have tried using the suggestions I was able to find on this forum and elsewhere but still having issues with resolution in the finished product.

 

Image is crisp in both png and jpg but when using the following, the image ends up pixelated on the PDF. It does not happen all of the time depends on the image being used.

 

%let Image='Drive:\folder\folder\folder/LOGO_1.PNG' dpi=300;

 

Same problem here

ODS LAYOUT ABSOLUTE;

ODS Region Y=0.1in X=0.1in;
ODS text= "~{style[preimage='Drive:\folder\folder\folder/LOGO_1.PNG']}";
ODS Region Y=0.38in X=2.5in;
ODS text= "~{style[color=BL Font_size=16pt Font_weight=bold]&ANAME}";
ODS text= "~{style[color=BL Font_size=16pt Font_weight=bold]Report name}";
ODS text= "~{style[color=BL Font_size=16pt]&monthfull &Y}";

 

Any suggestions would be appreciated.

5 REPLIES 5
ballardw
Super User

You don't show where you might be attempting to use any image resolution setting so it is hard to make pointed suggestions.

Generally the image settings such as DPI in SAS only relates to graphs created by SAS. Are you referencing an image made by something else and expecting SAS to re-build the image to a different resolution?

 

Also, does your log include any notes or messages about image resolution and/or memory constraints when creating/using the images?

JacobC
Calcite | Level 5

Thanks for the tip regarding the DPI= option. 

I was able to bump up the resolution on the originals and they coming in sharper now.

Thanks for the quick reply

PGStats
Opal | Level 21

The documentation states that when importing image files to a PDF document, the image dpi should match the dpi specified when the PDF was created (by default, it is 150 dpi).

PG
Ksharp
Super User
DPI=
specifies the image resolution for output files.


ods pdf file='...........' dpi=300 ;
JacobC
Calcite | Level 5

Thank you for your reply. 

 

I was able to boost the resolution on the images I am pulling into the process and exporting to the PDF.

 

This issue is now solved.

 

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 5 replies
  • 1625 views
  • 0 likes
  • 4 in conversation