width and height to use for an image for advanced ...
# ask-stanley-ai
s
width and height to use for an image for advanced pdf template
c
AI generated answer (using internal Slack threads):
In NetSuite Advanced PDF templates, the width and height of an image can be set using the
width
and
height
attributes in the
img
tag. However, the
max-width
and
auto
values are not supported. If you have different logos for different subsidiaries and you want to avoid distortion, you might need to use conditional statements to set different width and height values based on the subsidiary. Here's a simplified example:
Copy code
html
<#if subsidiary.id == "1">
    <img src="${logoUrl}" width="100px" height="100px"/>
<#elseif subsidiary.id == "2">
    <img src="${logoUrl}" width="200px" height="100px"/>
</#if>
In this example, the
width
and
height
are set to different values depending on the subsidiary's ID. Please note that this is a workaround and it might not be the best solution in all cases. It's also important to note that the aspect ratio of the image might not be preserved if the width and height values are not proportional to the original image's dimensions. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.831461728
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.82610327
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.813349068
Please provide your feedback on this answer.