BookmarkSubscribeRSS Feed
chandler
Fluorite | Level 6
I inherited this code from my former manager. I understand that he is reading a .jpg image to create this logo / letterhead on the report, but when I open the image manually, it looks clear and in focus, while than the one on the ods pdf report looks distorted and out of focus, after this code is run.

This is in his title section just before the PROC REPORT code:

ods escapechar = '^' ;
title1 j=l '^S={preimage=


I've seen other instances where this image is referenced but the code looks like this:

TITLE j=l '
Although this second example references the same exact file path and filename, the image on the ods pdf report is as clear and in focus and the manually opened .jpg file .
1 REPLY 1
Cynthia_sas
SAS Super FREQ
Hi:
Sometimes your < and > symbols in the code will cause the forum posting to look weird or appear incomplete. This posting will explain the use of
[pre] and [/pre] and &lt; and &ampgt; to get around this happening.
http://support.sas.com/forums/thread.jspa?messageID=27609毙

The other thing is that
1) the <IMG SRC= .... > method will ONLY work for ODS HTML -- not for ODS PDF. The image is loaded from the SRC= location by the browser,

2) on the other hand, anytime you use ODS PDF or ODS RTF and use an IMAGE -- whether with ODS ESCAPECHAR and PREIMAGE or with SAS/GRAPH or ODS GRAPHICS,
your image is -CONVERTED- to an internal graphic format -- either PDF internal form or RTF internal form. (You can see that, in fact, the image is being transformed by creating an ODS RTF file (for test purposes) and then opening the RTF file with Notepad and searching for the \pict command -- this is the start of the transformed image. PDF does the same thing, you just can't see down inside the PDF file because it is in a proprietary format.)

So you can't compare how the image looks when you open it with a picture viewer and how the image looks inside the PDF (or RTF) document because the image has been transformed by the time you open the document.

My only recommendation is to make sure that the image is very close to the size you want it to be and to experiment with various image formats to see which gives you the least fuzziness on transformation...I've had fairly good success with both .JPG and .PNG. I haven't tried GIF and TIF or other formats, but you could also try saving your logo in those formats.

Otherwise, your best resource is to open a track with Tech Support to see whether they have any ideas how you can use an image in PDF without fuzziness.

cynthia

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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