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: 
mattiasbrandt
Contributor II
Contributor II

Nprinting HTML Background

Hi,

How do I insert an image as background in an html-report. Preferebly in a table, as I will add som values over the picture.

I have tried following without success:

Thanks in advance!

<html>
    <body >
      <table width="1500" hight="300" background=<img src="%%JTcQk%%" alt="JTcQk">>
           <tr hight="100">
               <td width="250">cell1</td>
               <td width="250">cell2</td>
           </tr>
           <tr hight="100">
               <td width="250"> cell3</td>
               <td width="250"> cell4</td>
           </tr>
      </table>
    </body>
</html>     

 

Labels (1)
7 Replies
Ruggero_Piccoli
Support
Support

Hi,

I suggest you to open a support ticket about this. We need the help of a developer to investigate the issue.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
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 with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

I think your HTML syntax is not right

 

 background=<img

 

On top of the above when you drag&drop image on the template it is converted to base64 image with parameters like hight, width etc.. which messes up inline syntax

I suggest you create your image as Base64 text encapsulated in NPrinting formula and then use this formula as on screenshot/script below:

 

<html>
    <body >
      <table width="1500" hight="300" style="background-image: url(%%image%%)"> 
               <td width="250">cell1</td>
               <td width="250">cell2</td>
           </tr>
           <tr hight="100">
               <td width="250"> cell3</td>
               <td width="250"> cell4</td>
           </tr>
      </table>  
    </body>          
</html> 

 

1.PNG

more about base64 here:

https://nprintingadventures.wordpress.com/2019/05/24/creating-email-content-in-nprinting/

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.
mattiasbrandt
Contributor II
Contributor II
Author

Thanks for the answer!

 

For me, this does not display an image as a background in the table, even if I follow the instructions and use your script exactly as it is. Have you been able to do so?

Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Yes It worked for me

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.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

I always test my answers, so yeah - it worked

attached is my exported report template (no password is required)

cheers

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.
Ruggero_Piccoli
Support
Support

@Lech_Miszkiewicz  Inserting the image in a formula means that you will have a fixed image, not a Qlik Sense object exported as image and used as background of the table. I supposed the second was the request.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
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 with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Totaly agree with you @Ruggero_Piccoli !!

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.