Environment - AEM Forms 6.5 SP 12 (adobe-aemfd-win-pkg-6.0.640) ( On Prem)
Based on our findings it appears that once we create a bookmark in XDP template using Forms designer see [1] and provide input XML source. One should be able to generate PDFs with bookmark using FormsService API. And as a next step we can use AssemblerService API (with DDX [2]) to create Table of Contents dynamically.
However, we are unable to create bookmarks for all of the pages of PDF in XDP, using [1] we can create bookmark for just one page (say Page 3 or 5) but it is inconsistent and does not show bookmark for all other pages in PDF using XDP template. Can anyone help us to find out a sample code or example where generating Table of Contents dynamically using bookmarks is working fine.
P.S. Any adobe office link or private blog with respect to this will be helpful.
[2] <?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns=http://ns.adobe.com/DDX/1.0/>
<PDF result="out.pdf">
<PDF source="pdf1" pages="1"/>
<TableOfContents>
<Header styleReference="TOCheaderStyle"/>
</TableOfContents>
<PDF source="pdf1" pages="3-23"/>
<PDF source="pdf2" pages="1-14"/>
<PDF source="pdf1" pages="24"/>
</PDF>
Views
Replies
Total Likes
Hi @nitin_seth,
[0]: https://www.albinsblog.com/2015/04/how-to-send-html-email-using-velocity-adobecq5.html#.Y3ucHuzMLdo
[1]: https://velocity.apache.org/engine/
Hope that helps!
Regards,
Santosh
@SantoshSai This is a different product, this relates to assembler API for forms.
@nitin_seth share one xdp with me with the DDX file for assembler which is causing issue
Mayank, we got it working with OOTB gotoPage [1] for all the pages. However we are looking for any OOTB solutions available in forms designer (XDP template) where one can generate the Table of contents dynamically soon after PDF was created using FormsService/ OutputService?
For info we did following to generate the Table of contents (TOC) dynamically for a given XDP & XML input:
- create bookmark in XDP template by applying the script [1] at subform level on each page where bookmark was needed
- prepared XML data based on schema
- used Forms Outputservice API to generate the Document object
- passed same doc object to AssemblerService with a DDX rule to generate the TOC along with PDF
- TOC at page no# 2 was generated perfectly fine along with other required PDF pages
however internally we are still verifying if we can generate TOC from within XDP itself? or possibilities of any OOTB solutions if any, do let us know. thanks.