Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
konidena
Creator
Creator

Nprinting November 2017- Image height is not able to control in HTML template

Hi Team,

I have create the Report in Nprinting November 2017 and the template type i selected as HTML.

Opened the Nprinting designer and Added the Chart object with the below code.

<html>

    <body>

               <img src="%%957f48af-30a7-4ca2-9499-57500208708b%%" alt="957f48af-30a7-4ca2-9499-57500208708b"

               height="400">

    </body>

</html>

Still I am not able to control the height of the object when it is opening in the browser. Preview is showing too much height of the chart I added. Please help me here.

regards

Srinivas

1 Solution

Accepted Solutions
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

So regarding this there are 2 things

  • size of your img tag which you can control pixel perfect
  • size of your source image which i find difficult to control since its more grid base in Qlik Sense

regarding your question - here is the answer:

you need to use inline style

<html>

    <body>

          <img src="%%SCUVwj%%" alt="SCUVwj" style="height:100px;width:100px;" alt="25"/>

    </body>

</html>

but also keep in mind how does your chart look like in Qlik Sense as it will maintain ratios see below example:

2.png

HTML size is 100x100 but image size was different (see inspect package)

1.png

now when i changed this in qlik sense to more square object:

3.png

The output is also more square and looks better

4.png

cheers

Lech

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.

View solution in original post

4 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

What do you mean to much hight? What size does your image tag needs to have. Can you screenshot what you got and what would be expected result.

regards

Lech

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
konidena
Creator
Creator
Author

The Image height is coming as 1080. But i am expecting 450.Inserted the image here.

Height.JPG

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

So regarding this there are 2 things

  • size of your img tag which you can control pixel perfect
  • size of your source image which i find difficult to control since its more grid base in Qlik Sense

regarding your question - here is the answer:

you need to use inline style

<html>

    <body>

          <img src="%%SCUVwj%%" alt="SCUVwj" style="height:100px;width:100px;" alt="25"/>

    </body>

</html>

but also keep in mind how does your chart look like in Qlik Sense as it will maintain ratios see below example:

2.png

HTML size is 100x100 but image size was different (see inspect package)

1.png

now when i changed this in qlik sense to more square object:

3.png

The output is also more square and looks better

4.png

cheers

Lech

---------------------------------------------

When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Anonymous
Not applicable

try this:


<img src="......" style="width:50px !important;height:45px !important;" />