Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
bramkn
Partner - Specialist
Partner - Specialist

.NET SDK C# Image Export

Hi,

So the people using JS got the Image export available with their API.

Is there anyone that found a way to do this within C#? 

Apparently the API's for this are not public, but why??

 

I have got it to work with opening a browser and navigating through it to export the image and get it from the server. But this is not really reliable to use.

If the API's are not going to be public, is there a way to for example put a bit of JS within the application and handle this image export for the C# bit? If so does it need any install of node.js for example? I have not worked with JS and the Qlik API's.

If someone would be able to provide sample code for this last bit, that would be really awesome.

Labels (7)
33 Replies
agigliotti
Partner - Champion
Partner - Champion

Hi @bramkn , @Øystein_Kolsrud  , @Alexander_Thor 

I'm trying to use the below code to create a snapshot:

Qlik.Sense.Client.Snapshot.ISnapshot sd;
sd = qsApp.CreateSnapshot("xyz", sheet.Id, top5Customers.Id);
string objectData = sd.SnapshotData.PrintStructure();

objectData looks like the following:

"{\"object\":{\"size\":{\"h\":481.84613,\"w\":835.3125}},\"content\":{\"size\":{\"h\":454.84613,\"w\":835.3125},\"chartData\":{\"discreteSpacing\":0.0,\"axisInnerOffset\":0.0,\"hasMiniChart\":true,\"legendScrollOffset\":0.0,\"scrollOffset\":0.0}},\"parent\":{\"h\":1983.38452,\"w\":2753.75}}"

I also tried with:

sd.Layout.PrintStructure();

but the image is still not being generated.

What method should I use to make the HTTP POST request to Qlik Printing Service?

Many thanks in advance.

Best regards

agigliotti
Partner - Champion
Partner - Champion

Hi,

Finally I got the object exported as image with snapshot and object layout structure.
Thank you all for your collaboration.

Best regards
Andrea

desqloud
Partner - Contributor
Partner - Contributor

Hi @agigliotti , can you share this part of your code plz ?

agigliotti
Partner - Champion
Partner - Champion

Hi @desqloud ,

I'm sorry but I can't share the code free of charge.

Best Regards