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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

How to generate an PDF file

RockLala
11-Garnet

How to generate an PDF file

Hello everyone 

I am trying to create pdf file on button click event. For this I am  useing createPDF() function. its working fine but not as excepted because while i am passing any text file as input to this function it create one pdf but that pdf file having Image of that text file data. not actual data is there any why to create pdf without image as its data .....?

 

Thanks in advance 

 

1 ACCEPTED SOLUTION

Accepted Solutions

CreatePDF generates a kind of Screenshot on the server side, all it's an Image. To generate a "real" PDF you will need another library and build your own extension, or use a third party PDF Generator server, or if it's at user request you can try a Javascript Browser library that can create the PDF at client side, something like: https://parall.ax/products/jspdf of course you will also need to create a UI ThingWorx Extension.

View solution in original post

4 REPLIES 4

CreatePDF generates a kind of Screenshot on the server side, all it's an Image. To generate a "real" PDF you will need another library and build your own extension, or use a third party PDF Generator server, or if it's at user request you can try a Javascript Browser library that can create the PDF at client side, something like: https://parall.ax/products/jspdf of course you will also need to create a UI ThingWorx Extension.

Thanks for reply ...

Could you please help me into this how i can create / build custom Extension to full fill this requirement. which extra library i need ? 

 

Thanks 

Here you have the Extension Developer Guide for ThingWorx: https://www.ptc.com/es/support/refdoc/ThingWorx_Platform/8.3/thingworx_extension_development_user_guide_170215

 

About selecting which Library/Approach to choose it's a project in itself.

slangley
23-Emerald II
(To:CarlesColl)

Hi @RockLala.

 

If the responses provided by Carles has answered your question, please mark one as the Accepted Solution for the benefit of others who may have the same question.

 

Regards.

 

--Sharon

Top Tags