Hi All,
I have a requirement where i need to pass two different images over different location in docx dynamic template.
«[#list logo as logo]» image«[/#list]» location 1 .
«[#list lang as lang]» image«[/#list]» location 2.
As there are two images to be added , i am passing ={logo:pv!photo,lang:pv!photo} to the Image input parameter of the smart service. But only the logo paired image is getting displayed and the other one doesn't show up.
So can anyone help me in the syntax or the annotations needed to get these images rendered?
Discussion posts and replies are publicly visible
Hi Larsen,
Probably you already found the solution by now, however as the question still marked as Not Answered I hope is not too late for try helping you out.
The way how you have configured the pv! And the MergeField are correct, I believe that the only thing missing for you is to create Bookmarks in the hyperlink of the images, please check the screenshot of my example.
Example of my input parameter: ={logo:pv!logoDocument,chart:pv!chartDocument}
In your case you would need to create 2 bookmarks, one “Logo” and one “Lang”
Regards,
Acacio B.
Hello,
I was going through the post and had a similar kind of required. In my case I have 4 images to insert into the document.
I had two questions regrading -
1- When I copy the image field from the Document Plug it auto create the logo bookmark. But when I try to copy the image again the bookmark is not created. I tried several ways to get the bookmark created but in vain nothing worked for me.
2- There is an issue with parsing when trying to generate the document through the process. For single image I dont see any problem.
I have attached the template I'm trying to add the images. Can you please let me know if the template is correct?
Looking forward for your reply.
Thanks & Regards
Girish KattiDummyTemplate (1).docx
Hi
It seams to me that the problem you are facing is more related to the MS Word behavior, and sometimes the Word can be bit annoying work with.
I have changed the template that you sent, I hope that now you can generate your document.
Acacio B
6087.DummyTemplate (1).docx
Hello Acacio,
Thankyou very for the response. Let me try and revert back with the results to you.
Thankyou again.
Girish Katti
Below is the error that comes when running the process model, but not sure where is the problem
Parsing error in template "fr.opensagres.xdocreport.document.docx.DocxReport@74cbdc4f!word/document.xml" in line 4, column 8155:Unexpected directive, "[/#if]". Check whether you have a valid #if-#elseif-#else structure.
Below is the configuration
Hey Girish, I can tell you couple things for you to check. The error that you attached is not related to the images, but to an IF condition that was not properly implemented, as I could not find any IF in your previous uploaded template I'm assuming that one was just an snapshot of your real template, so please check all IF conditions that you have and check if they are correct implemented.
Other thing that could help you is that you could use the function toXml() in order to generate your XML files, that way you avoid text manipulation and is way easier to generate a proper XML, this is just a tip you dont actually need to follow that.
Check the IF's in the template and let us know.
Thankyou very for the reply.
In the DOCX Dynamic Template Smart Service, I'm calling the template shared directly in the process. In the template other than the 4 images defined there is no "if" clause mentioned and not other fields referenced.
Also for xml generation added the toXml() function in the expression rule.
Attached document for reference.
6087.DummyTemplate.docx