BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I am having problems with producing a PDF using ODS OO, from the mainframe, with an image included.

The example I used was from SUGI28 "Next Generation Data _NULL_ Report Writing Using ODS OO Features" by Daniel O'Connor" - example 3.3 from the downloaded zip file.

The PDF document itself displays correctly but I can't get a .gif or .jpg from the mainframe to display - I have used another PDF report generator (TXT2PDF) to verify that the image file is not corrupt.

The message from the log is "Unable to load image "any.gif": default image will be used" which results in a question mark in a green circle being displayed.

Image is specified as follows:

obj.region(column: 1);
obj.image(text: "any.gif", overrides: "just=Left vjust=top" );

In the original article the logo "Seattle.gif" may have been created using SAS/GRAPH.

I have two questions:

1. Can SAS only load image files that it has created.

2. If not does the image have to be in a special format for SAS - if so could anyone let me know how to go about converting an existing image to that format.
4 REPLIES 4
Cynthia_sas
SAS Super FREQ
Hi-- this may be a question for Tech Support. The image you use does NOT have to be from SAS/Graph. For example, let's say you have a corporate logo that you want to insert into ODS output. In general, the way images work in ODS is this:

HTML -- ODS builds an IMG tag, so the image location MUST be the location that will be used when the HTML page is rendered

PDF and RTF -- ODS does NOT build an IMG tag for these destinations. The images are converted to an internal format appropriate to the destination. BUT, this means that the location of the image you're using MUST be the place where the image is stored WHEN the PDF or RTF file is created.

I do not remember the destination that was being illustrated in the paper that you referenced, however, by the reference method (filename.filetype), I believe that demo was run on a Windows or Unix system and the image file was in the same directory where the output file was being created. If you were creating the PDF file on the mainframe, then the image has to be available on the mainframe to be loaded when the PDF file is created.

Also, this Tech Support note explains that for PDF, the name you specify must be an absolute reference (not a relative "filename.filetype")
http://support.sas.com/faq/045/FAQ04502.html

There are a couple of issues in general with the creation of PDF files on the mainframe (since PDF is a proprietary file type) and you have to FTP the output back to a platform that has Acrobat Reader or some other software for rendering the PDF output. But at the point where the rendering software is involved, the image has ALREADY been embedded in the PDF file in internal PDF format.

Tech Support can help you with these issues and let you know whether it's still appropriate to use the techniques outlined in that paper. The techniques were very experimental when the paper was written.
cynthia
deleted_user
Not applicable
Thanks for the response - I'll try Tech Support
deleted_user
Not applicable
Hi Cynthia,

Thought you might like to know that Tech Support were able to resolve the issue for me. Without going into too much detail it seems that the only way to use images from the mainframe is to store them in a UNIX System Services HFS file and then specify the path as '/u/usr/images/any.gif' (for example) in the image statement.

Regards

Mike
Cynthia_sas
SAS Super FREQ
Thanks for sharing the outcome. That's good to know! I'm convinced that, collectively, Tech Support knows everything about SAS and different platforms and....who knows what else...
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!

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