PDF Download using thingworx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
PDF Download using thingworx
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.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Tags:
- Lease
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Tags:
- Lease
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
