Skip to main content

Official Support Articles

Search or browse our knowledge base to find answers to your questions ranging from account questions to troubleshooting error messages. The content is curated and updated by our global Support team

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW

NPrinting incorrect image from Sense or CEF rendering error - Initial Testing on the printing mashup

cancel
Showing results for 
Search instead for 
Did you mean: 
Sonja_Bauernfeind
Digital Support
Digital Support

NPrinting incorrect image from Sense or CEF rendering error - Initial Testing on the printing mashup


NPrinting tasks executions or reports previews are failing with a CEF rendering error message.
Or reports are created but the images from Qlik Sense are not correct. You may see incorrect colors or the image is cut.

For a video with walkthrough of the concepts in this article please see STT - Troubleshooting Qlik Sense Images in NPrinting Reports

Environments:

  • Qlik NPrinting June 2018 and higher

Cause:


The images that NPrinting imports from Sense are created in a separate page (Printing Meshup) inside Qlik Sense.
We can replicate the process that Qlik Sense follows to create these images.
This gives relevant information to troubleshoot any formatting problems.

Resolution:


We will test the image creation in Qlik Sense, so we will see what is the image that Qlik Sense actually creates and sends to NPrinting. This is useful to understand if the problem is due to NPrinting or to Qlik Sense.
Images are created in a page hidden in Qlik Sense and called "Printing Mashup". We are going to connect to this page and ask to generate the image. To do this, we will need to know the app ID and the image ID.
The following steps must be performed on the Sense Server NPrinting is connecting to.

 

1. Get the Virtual Proxy address, App ID and the ID of the image you want to export.

  • The Virtual Proxy and App ID information can be found under 'Connections' in the NP web console. Open your connection affected to retrieve this information.

App ID and Virtual Proxy address.PNG

  • The "Sense Image ID" can be seen in the NPrinting template editor.

App ID.PNG

  • Directly in the Qlik Sense application - in the hub connecting with Chrome, you can get the object ID with details found in the article How to identify an object in a Qlik Sense app by object id 
  • Another option:    
    • Right click on the image an choose Export to PDF or Export to image.                   
    • Open the browser development tool (F12) and click on the "Export" button
    • In the browser development tool>Network, you can see a POST message. Double click on it and choose Params in the ribbon bar. Scroll down the JSON file to find APP ID and Image ID.
 

2. Connect to the Printing page

  • Launch Chrome Browser tab and insert the following URL to the chrome address bar (Chrome Browser is required to perform these tests)

 

 

https://myqliksenseservervirtualproxy.com/resources/printing-live.html?callback=cconsole&logging=net,ws

 

 

  • Replace myqliksenseservervirtualproxy.com with the virtual proxy address used in your NPrinting Connection to the associated Qlik Sense application

Example

 

 

https://qlikserver1.domain.local/resources/printing-live.html?callback=cconsole&logging=net,ws

 

 

Note that if are attempting to troubleshoot this issue independently and you are unable to connect to this page, please take snapshots of the connection issue attempts and open a support case.

You will not be able to proceed with Steps 3 and 4 if you cannot connect to this page successfully

 

3. Create Java Script code to call the image.

This Java script command will be used to call the image in the Qlik Sense Printing mashup code.

  •  qlikPrintingService.render("[appid]","","object","[objectid]")
  • "[appid]" is associated Qlik Sense App ID. In this example the Qlik Sense App ID is: 713ec3ce-6b7d-4233-85bc-b2fa61458a37
  • "[objectid]" is the affected Qlik Sense Object ID. In this example the affected Qlik Sense Object ID is: YjXMhr

Replace the example Qlik Sense App and Image IDs found above with those found in your environment.

Example Java Script Call:

qlikPrintingService.render("713ec3ce-6b7d-4233-85bc-b2fa61458a37","","object","YjXMhr")

*Recommend using a text editor to format this line before proceeding to step 4 below*.

 

4. Analyze the invalid/failing Qlik Sense image.

  • Choose F12 on your keyboard to open the Chrome Developer tool.
  • Go to Console on the ribbon bar and wait few seconds until you see the "onReady" message.
  • Paste the Java Script command created in step 3 and press enter.

console on ready with JS test code.PNG

Result: A 'Preview' of the Qlik Sense image should be generated verify its size and formatting. This is the image that exported from Qlik Sense and subsequently import by NPrinting.

console results.PNG

If the image does not appear

  • Diagnose and evaluate the 'Console' and 'Network' tabs for explicit error messages that might immediately guide you to internal network or other problems.
  • Collect the 'Console' and 'Network' logs in the Chrome development tool
  • Enable 'Preserve log' checkbox for both the'Console' and 'Network' buttons
  • Right click on the 'Name' column and select "Save all as HAR with content"
  • Attach the HAR log to the Qlik Support case.

Preseerve log and save as har with content.png

Labels (2)
Version history
Last update:
‎2022-09-13 01:58 PM
Updated by: