[PDF Generator Plugin] Error Code 32 invalid context data format

[PDF Generator Plugin] Error Code 32 invalid context data format

  
Forge Component
(5)
Published on 2017-10-18 by Experts
5 votes
Published on 2017-10-18 by Experts

Hi there,

really excited to make use of this module, however ran into a snag.

When using the BuildTemplate action:
In the input parameter Template I define the following.


"<html>
    <body>
        <p>{{name}}</p>
    </body>
</html>"


and in the Context I define

"{
    name: 'John Doe'
}"

I have also tried

"{
    name: ""John Doe""
}"


however this keeps failing, what is the correct way to wrap the context ?





EDITED:
I have found the correct way:
context should be :

"{
    ""name"": ""John Doe""
}"

Leeroy Stander wrote:

Hi there,

really excited to make use of this module, however ran into a snag.

When using the BuildTemplate action:
In the input parameter Template I define the following.


"<html>
    <body>
        <p>{{name}}</p>
    </body>
</html>"


and in the Context I define

"{
    name: 'John Doe'
}"

I have also tried

"{
    name: ""John Doe""
}"


however this keeps failing, what is the correct way to wrap the context ?





EDITED:
I have found the correct way:
context should be :

"{
    ""name"": ""John Doe""
}"


Hi Leeroy Stander,

     Is the only way to give the template and context using the handlebarjs codes??? .. Can u give me a demo mobile application that uses PDF Generator Plugin to generate the pdf files.. It would be great help...

Hi Ebina, Attached is an example.

Hi Leeroy Stander,

I gave a sample url but it is not working... Whenever I click the container It displays  Javascript:void(0) ... 

Ebina Sony wrote:

Hi Leeroy Stander,

I gave a sample url but it is not working... Whenever I click the container It displays  Javascript:void(0) ... 


Hi Ebina,

Can you confirm that you have:

1. Generated a Native app via service studio.
2. Installed the app on your phone.
3. Tested it on the phone.

I have done above steps and works for me

If trying to use via web browsers, I doubt it will work.





How to pass image path in context while building template?

Normal data is getting passed correctly but facing issue while using images to be shown in pdf