Help using Base SAS procedures

PROC REPORT using company logo image on title line of report headings

Reply
Contributor
Posts: 61

PROC REPORT using company logo image on title line of report headings

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 .
SAS Super FREQ
Posts: 8,743

Re: PROC REPORT using company logo image on title line of report headings

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
Ask a Question
Discussion stats
  • 1 reply
  • 330 views
  • 0 likes
  • 2 in conversation