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

We are working to address an issue with subscription email notifications. In the meantime, be sure to check your favorite boards for new topics.

How to show base 64 content of PDF in Thingworx Mashup

BABA-SHYAM
14-Alexandrite

How to show base 64 content of PDF in Thingworx Mashup

Hi,

 

I have some base 64 content of a PDFs. I want to show them on mashup. Using Iframe I can show it normal html page but, not in thingworx mashup.

 

I have done showing pdf from external URL, pdf from repository but not getting successful using base 64 content. I am attaching few files for the reference.

 

Save as attached file into .htm file and you can see it in browser. I am using same text in TEXT property of "htmltextarea" widget  in thingworx (9.1.0-b10877). But it is not showing anything. By inspecting the page I can see it only show html tage with empty body.

 

Regards

Shyam

 

1 ACCEPTED SOLUTION

Accepted Solutions
BABA-SHYAM
14-Alexandrite
(To:BABA-SHYAM)

Hello All,

 

I just found a way after trying many ways. Follow below steps to complete this. I am using Thingworx version (9.1.0-b10877).

 

1. Take a "ptcsvaluedisplay" widget.

2. Find "ValueFormat" property and click "Renders & State" button in front of this property.

3. In the "Renderer" dropdown, select "HTML".

4. In the "Format" dropdown, select "With Formatting, Unsanitized (not-secure)".

5. Bind the result of service to the (* data) of this "ptcsvaluedisplay" widget.

6. Result of service should be in below format. Replace |--------| in below format with the base 64 content.
<iframe src="data&colon;application/pdf;base64, |---------| "  height="100%" width="100%" frameborder="0"></iframe>

 

Happy hunting.

Regards

Shyam

View solution in original post

1 REPLY 1
BABA-SHYAM
14-Alexandrite
(To:BABA-SHYAM)

Hello All,

 

I just found a way after trying many ways. Follow below steps to complete this. I am using Thingworx version (9.1.0-b10877).

 

1. Take a "ptcsvaluedisplay" widget.

2. Find "ValueFormat" property and click "Renders & State" button in front of this property.

3. In the "Renderer" dropdown, select "HTML".

4. In the "Format" dropdown, select "With Formatting, Unsanitized (not-secure)".

5. Bind the result of service to the (* data) of this "ptcsvaluedisplay" widget.

6. Result of service should be in below format. Replace |--------| in below format with the base 64 content.
<iframe src="data&colon;application/pdf;base64, |---------| "  height="100%" width="100%" frameborder="0"></iframe>

 

Happy hunting.

Regards

Shyam

Top Tags