Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi Experts,
I am trying to download PDF using ExportPDF extension but facing issues.
When I execute CreatePDF service with required inputs and execute it, the service is showing just executing as status and not giving any output or error.
Can someone help me how can I download PDF in thingworx, Is there a way we can download pdf without using ExportPDF extension.
Best Regards
Lakshmi.
Solved! Go to Solution.
Please try below steps and let me know,if it works for you.
1. Import latest PDF extension from marketplace/Thingworx labs.
2. You will get PDF Export as a Resource added to Composer.
3. On Event,configure and trigger the service "CreatePDF"
var params = {
FileRepository: " " /* THINGNAME */,
Rotated90Deg: false /* BOOLEAN */,
AppKey: "KEY"/* STRING */,
ServerAddress: " " /* STRING */,
OutputFileName: "FileName" /* STRING */,
Resolution: '1240*1775' /* STRING */
};
// result: STRING
var generatePDF = Resources["PDFExport"].CreatePDF(params);
4.Use GetFileListingWithLinks service to get the file using below syntax and pass it to Link widget.
var result = fileWithLink.rows[0].downloadLink;
5.Bind the service result to a Link widget and keep target window to same window option.
Hi,
1. One idea is to use REST API for the PDF file.
2. I don't understand from where you want to download PDF, but if you have the file in a Repository on Thingworx Server you can use service GetFileListingWithLinks available for any repository thing.
See below:
Hope it helps,
Raluca Edu
Hi Raluca,
Thank you for help.
I want to create a PDF from Thingworx mashup using CreatePDF service of ExportPDF extension.
while executing service it is not showing any update.Attaching screen shot for reference.
Please try below steps and let me know,if it works for you.
1. Import latest PDF extension from marketplace/Thingworx labs.
2. You will get PDF Export as a Resource added to Composer.
3. On Event,configure and trigger the service "CreatePDF"
var params = {
FileRepository: " " /* THINGNAME */,
Rotated90Deg: false /* BOOLEAN */,
AppKey: "KEY"/* STRING */,
ServerAddress: " " /* STRING */,
OutputFileName: "FileName" /* STRING */,
Resolution: '1240*1775' /* STRING */
};
// result: STRING
var generatePDF = Resources["PDFExport"].CreatePDF(params);
4.Use GetFileListingWithLinks service to get the file using below syntax and pass it to Link widget.
var result = fileWithLink.rows[0].downloadLink;
5.Bind the service result to a Link widget and keep target window to same window option.
Hi @Lakshmit.
If one of the previous responses answered your question, please mark the appropriate one as the Accepted Solution for the benefit of others with the same question.
Regards.
--Sharon