BookmarkSubscribeRSS Feed
DonH
Lapis Lazuli | Level 10
I've got a png image that I need to insert into PDF and HTML documents is reports produced by the Stored Process Server. I am using the same image in both (have it on both the SAS application and web servers since in HTML SAS generates an image tag, but in PDF it inserts it). For the PDF destination it works fine and is the right size. But when displayed in the HTML report the image (a logo) is way too big. I know I could probably request that the graphics folks create two versions. But I'd like to avoid that.

Is it possible to specify scaling for the HTML destination. I found sample syntax to do that in 9.1.3. But there is a usage note that says to not use that syntax in 9.2 as its done differently in 9.2. But I can't find any references to how to do this in 9.2.

TIA.
2 REPLIES 2
Eric_SAS
SAS Employee
Scaling is not supported in pre-images. Height and width can be specified in a style, but pre-image is part of a style not an object that can have a style so it also cannot have a height and width assigned to it.

You could do it with prehtml, code the img tag you want directly into prehtml, it comes out in the same place as preimage.

This will require a different style to be used for html, because you don't want to specify preimage as well as prehtml.

Alternatively, the html tagset could be modified to scale the image the way you want, the scale could be hard-coded into the pre_post event.
Anything is possible, perhaps a new pre-image-scale option in tagattr would do the trick.

Eric
DonH
Lapis Lazuli | Level 10
Thanks Eric. PREHTML is exactly what I needed.

With your permission, I would like to post a note about this (and point to this thread) as a Tip of the Day on sasCommunity.org.

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