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: 
kvwomack3
Contributor
Contributor

Dynamic sizing of HTML Images

Hello all,

I'm creating an NPrinting publishing task that includes an embedded HTML report.  The report contains images of tables from a Qlik app.  I'm wondering if it's possible for NPrinting to adjust the size of the table image based on the contents of the table.  That is, if the report has 1 or 1000 rows, is NPrinting able to dynamically size the table image up or down, based on the number of rows in the table.

Any guidance would be much appreciated.

Labels (2)
1 Solution

Accepted Solutions
jdod42
Employee
Employee

By default, Qlik Sense charts exported into Qlik NPrinting will look exactly as they do in the connected Qlik Sense app, but there are various properties that can be customized which will affect the size of an Image object. In particular, I would recommend looking at the Stretch parameters, but the Max Width and Max Height parameters as well as the Data Displayed parameters might be helpful too.

Take a look here for specifics and various examples (look under the "Changing image size of Qlik Sense charts" section for info on the Stretch parameters): https://help.qlik.com/en-US/nprinting/September2020/Content/NPrinting/ReportsDevelopment/Image-Dimen...

If these don't get you to the desired result, you might also consider using a Table object instead of an Image.

View solution in original post

5 Replies
jdod42
Employee
Employee

By default, Qlik Sense charts exported into Qlik NPrinting will look exactly as they do in the connected Qlik Sense app, but there are various properties that can be customized which will affect the size of an Image object. In particular, I would recommend looking at the Stretch parameters, but the Max Width and Max Height parameters as well as the Data Displayed parameters might be helpful too.

Take a look here for specifics and various examples (look under the "Changing image size of Qlik Sense charts" section for info on the Stretch parameters): https://help.qlik.com/en-US/nprinting/September2020/Content/NPrinting/ReportsDevelopment/Image-Dimen...

If these don't get you to the desired result, you might also consider using a Table object instead of an Image.

kvwomack3
Contributor
Contributor
Author

Thank you for the feedback.  When I look at the image properties in the report designer, I only see the Data Displayed Height and Data Displayed Width parameters.   I don't see a Stretch, Max Width or Max Height.   Could this be a matter of the version of NPrinting I'm using?  We're currently on September 2019.  

jdod42
Employee
Employee

It shouldn't be a problem if you are using September 2019. Quick side note: you can actually change the version in the top left of the side bar of the help page where it says the version under the product name. Here is the same page but for September 2019 version: https://help.qlik.com/en-US/nprinting/September2019/Content/NPrinting/ReportsDevelopment/Image-Dimen...

I tested it in my environment, and the last option in the properties in the bottom left when I click on an individual image is Stretch and I can change those parameters. So you should see this too if you click on an individual image.

For Max Width and Max Height, note that it changes depending on what type of template you are using. They can be explicitly set in Excel templates. So if I open an Excel template, they are the options right above Stretch in the properties in the bottom left. In Word and PowerPoint templates, however, they can only be implicitly retrieved by the image placeholder. So if you are using a Word or PowerPoint template, then I believe you need to place the image onto the page/slide and then edit the placeholder image properties using the native Word/PowerPoint functions.

I've included a screenshot of the properties in an Excel template for reference.

kvwomack3
Contributor
Contributor
Author

The report I'm creating is an HTML report.   It's meant to be embedded in an e-mail message by a Publish task.  When I select the image, I don't see Stretch in the properties (see attached screenshot).NPrinting Image Options.PNG

jdod42
Employee
Employee

You might want to try using a Word template instead of an HTML template. You can actually use the Word template but still output as HTML. This would allow you to have access to the other image properties, but still have your final output be HTML. You could do the same with an Excel template or PixelPerfect as well, just note that PixelPerfect has different options for changing Image Size compared to the Word or Excel options that I was describing in the original answer. (See the bottom section of the Image Dimensions help page for info on PixelPerfect.)

For more info on Report output formats see here: https://help.qlik.com/en-US/nprinting/September2019/Content/NPrinting/DistributionSchedulesAutomatio...

If you need to keep using the HTML template, then you will not get the Max Width and Max Height parameters. You may need to try working with the Data Displayed Height and Width parameters or using a Table object.