Hi everybody! 👋
I want to export a custom chart visualization I created with Picasso.js in a Qlik sense mashup (created with React.js) as Pdf or image. I've been able to set a function to export the same chart as data (.xlsx), but when I try to export it as image or Pdf I receive an "Internal Server Error" (on server) or a "Blocked by CORS warning" (on localhost). The same functions work well with embedded Sense visualizations.
I am using the exportPdf and exportImg methods of the Visualization API.
My issue seams the same as this topic in the Qlik Community Forum.
POST https://40.113.14.238/printing/export/object/pdf?requestId=957dc6b8-3e3b-4fdd-94c8-ae3dddc87411 500
The local error:
Access to XMLHttpRequest at 'http://localhost:9073/printing/export/object/image?requestId=61981b8a-d45b-4dfb-a622-e1f19dd65027' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
Hi everybody! 👋 I want to export a custom chart visualization I created with Picasso.js in a Qlik sense mashup (created with React.js) as Pdf or image. I've been able to set a function to export the same chart as data (.xlsx), but when I try to export it as image or Pdf I receive an "Internal Server Error" (on server) or a "Blocked by CORS warning" (on localhost). The same functions work well with embedded Sense visualizations.
I am using the exportPdf and exportImg methods of the Visualization API.
My issue seams the same as this topic in the Qlik Community Forum.
What am I doing wrong? ðŸ˜
My function:
The server error:
POST https://40.113.14.238/printing/export/object/pdf?requestId=957dc6b8-3e3b-4fdd-94c8-ae3dddc87411 500
The local error:
Access to XMLHttpRequest at 'http://localhost:9073/printing/export/object/image?requestId=61981b8a-d45b-4dfb-a622-e1f19dd65027' from origin 'http://localhost:3000' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.
My mashup config: