cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Download TimeSeries chart as a picture

SOLVED
Highlighted

Download TimeSeries chart as a picture

Hi Developers,

 

I have developed a mashup which has a time series chart showing data (image attached). The requirement is to get this chart/mashup in a pdf file. Is there any default widgets to achieve this functionality.

 

Thanks and Regards,

Saran

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Download TimeSeries chart as a picture

You have to create the server address and map it to the createPDF service parameters on the mashup .Even i found one more post related to your query which directly print out the current mashup on button click 

 

Go through this post and see if this can solve out your use case --

 

https://community.ptc.com/t5/ThingWorx-Developers/PrintButton-Extension-project/m-p/532671

 

 

Thanks,

Mukul Narang 

 

 

7 REPLIES 7

Re: Download TimeSeries chart as a picture

There is a PDF Extension on MarketPlace - https://marketplace.ptc.com/apps/193615/pdf-extension#!overview

You can download this extension and import in in Thingworx .After importing it will bring a resource called PDFExport and under this you will get a service called createPDF .Using this service you can take a snapshot of any mashup as a PDF file .

 

Thanks ,

Mukul Narang 

Re: Download TimeSeries chart as a picture

Hi @mnarang,

 

Thanks for your response.

 

I have tried the service and a pdf is getting created but it seems to be blank. 

 

Regards,

Saran

Re: Download TimeSeries chart as a picture

Can you put on the screenshot of createPDF service arguments ? Just ensure you are passing correct App Key and what is the value that you are passing in server address ?

Re: Download TimeSeries chart as a picture

Hi @mnarang,

 

Sorry for the late response. I had tried the service once again and this time it worked as expected.

 

1. For the Server Address i have given the below:

 

"https://<IP Address>/Thingworx/Runtime/index.html#master=<MasterName>&mashup=<MashupName>"

 

2. To create App key i had used Administrator role.

There might be a chance if i had used an app key with a user whom doesn't have access to the mashup would get a blank pdf

So in a practical scenario if the user want to get the pdf in runtime at the press of a button, how would i get the Server Address ( the mashup URL which has to be dynamic since the user might want to get pdf of any screen of interest) ?



Thanks and Regards,

Saran

 

 

 

Re: Download TimeSeries chart as a picture

@mnarang

Could you please have a look on this.

Re: Download TimeSeries chart as a picture

You have to create the server address and map it to the createPDF service parameters on the mashup .Even i found one more post related to your query which directly print out the current mashup on button click 

 

Go through this post and see if this can solve out your use case --

 

https://community.ptc.com/t5/ThingWorx-Developers/PrintButton-Extension-project/m-p/532671

 

 

Thanks,

Mukul Narang 

 

 

Re: Download TimeSeries chart as a picture

Hi @mnarang and @mgoel,

 

Thanks for your suggestions. I had followed the link and was able to download the chart as a pdf. 

 

Regards,

Saran