How to link different bookmark
-
My purpose is when i click on the upper image, i could jump into the below image page.I am using "docxImage" for insert images, and I want to link the upper image to the below image, as we know each image should be attached with different bookmark, so actually these two images are using different bookmark at different position, and they are all in loop, so after the report rendered, the bookmark name would be concatted with some id like
"{{bookmark name}}_c110", and i can't find any way to generate the bookmark manually, so i don't know how to link these two bookmarks?
Hope i subscribe clearly enough, need some helps. Thx in advance my friends.
-
hi!
interesting, can you share your template? i can try to prototype some api that allows this, it will be much better to check against a real docx like yours
-
yes, but seems i can't upload my template here, could u plz provide me with your email my friend ?
-
you can share it in https://playground.jsreport.net/ or if you prefer with email, my email is bjrmatos@gmail.com
-
i just shared in playground, plz help to check my friend
https://playground.jsreport.net/w/xGreylee/uqT4dkjc
-
thanks, we will take a look
-
it seems some helpers are missing in your playground, when running i get
Error while executing docx recipe (because) error when evaluating engine handlebars for template anonymous (because) "docxContext" helper call failed (because) missing helper: "eq"
can you please update it to include your custom helpers?
-
oh sorry, just added it into demo
-
i am checking the template but the docx you show on the screenshot does not look the same as the one provided in the playground (i don't see a docx table with an image in cells) http://localhost:5488/studio/templates/282GZbaS1f
can you verify?
-
sorry, i missed the Appendix A Section, just added it, plz check again
-
i still see just the Appendix B section here https://playground.jsreport.net/w/xGreylee/uqT4dkjc
are you sure you have updated it?
make sure it is the same playground link, if not share the new one.
-
sorry, i think i forgot to commit the changes before, u should be able to see the Appendix A Section now.
-
Thanks for the support. This helped me in my work at site.
-
an update: i am still working on the api changes to support this case, so i will update here when it is ready
-
ok, thx for your effort to this function implement , my friend @bjrmatos
-
@xGreylee this feature was landed on jsreport 4.3.0 check the updated docs for it
Each image generated by docxImage generates a bookmark that points to the new image, customizing the bookmark (with bookmarkName option) will allow for other images to be able to create hyperlinks that target this specific image (just make sure to make the hyperlink of an image dynamic too with handlebars, the requirement is that the target resolves to #bookmarkName). using these two features, the custom bookmark name and the dynamic hyperlink target will allow to achieve dynamic linking between images in the document.