Posted 14 September 2022, 8:45 pm EST
Hi,
I’m actually testing Grapecity to generate PDF from WORD template after injecting JSON.
It’s working really fine but I don’t find how to insert an image in the Template from base64 json.
Forums Home / Document APIs / Documents for Word
Posted by: vincent.boyer.ucf on 14 September 2022, 8:45 pm EST
Posted 14 September 2022, 8:45 pm EST
Hi,
I’m actually testing Grapecity to generate PDF from WORD template after injecting JSON.
It’s working really fine but I don’t find how to insert an image in the Template from base64 json.
Posted 15 September 2022, 7:18 pm EST
Hello Vincent,
Please find the attached sample which shows how you can insert an image in the Template from base64 json.
If you need any other help, please let us know.
Regards, Prabhat Sharma.
Posted 15 September 2022, 7:18 pm EST
sample DataTplSimpleListJson.zip
Posted 4 October 2022, 5:48 pm EST
Thank you !
Posted 15 November 2022, 10:19 pm EST
Hi,
So, I’m keeping up my tests about injecting data with json.
For the picture :
{{ds.pic}:image()} is ok
But there is a way to resize the picture ?
*{{ds.pic}:image().resize(120,120)} *
Posted 15 November 2022, 10:52 pm EST - Updated 15 November 2022, 10:58 pm EST
Hello Vincent,
Yes, the image can be resized. Please use the below-given template for the same.
{{ds.pic}:image(120,120)}
We have also modified the last attached sample implementing the same.
Regards,
Prabhat Sharma.
DataTplSimpleListJson_Mod.zip
Posted 15 November 2022, 11:28 pm EST
Thank you.
There is a page with all these template function ?
Posted 15 November 2022, 11:39 pm EST
Yes, please check the following documentation and demo links for the same:
https://www.grapecity.com/documents-api-word/docs/online/data-templates.html
https://www.grapecity.com/documents-api-word/demos/report-templates
https://www.grapecity.com/documents-api-word/demos/report-templates/data-tpl-image/code-cs
Posted 16 November 2022, 2:53 am EST
Thanks