on ‎2024 Dec 13 12:56 AM
Hi,
The problem is if PDF files have more than 2 pages, the title doesn't show in page 3 and so on.
The master form template has 1 pageSet which contains 2 pages - mst1 and mst2.
I've checked the standard logic in txtPrintFormTitleText under frmHiddenGlobalFields in content form template.
//Set title on first page (always available)
xfa.resolveNode("#pageSet[0].mst1.FirstPage.frmHeader.txtTitle") = form_title
//Set title on subsequent pages (if available)
var pageCount = xfa.layout.pageCount();
if (pageCount > "1")
then
xfa.resolveNode("#pageSet[0].mst2.SubsequentPage.frmHeader.txtTitle") = form_title
endifBut I couldn't find any problem in the code.
Has anyone seen this behaviour before?
Regards,
Tri
Request clarification before answering.
Hello,
Thank you very much for your question.
Here's information that might help you:
Can you please check the following:
Check Page Count Logic: Ensure that the pageCount variable is correctly capturing the total number of pages. You might want to add debugging statements to verify the value of pageCount.
Verify Page References: Double-check that the references to mst1 and mst2 are correct and that these pages are properly defined in your master form template.
Script Execution: Ensure that the script is executing at the right time. Sometimes, scripts may not run as expected due to timing issues in the form’s lifecycle.
Master Form Template: Confirm that the master form template is correctly set up to handle multiple pages. The template should Manage Your SAP S/4HANA Cloud Public Edition - Master Form Templates have definitions for both mst1 and mst2 pages.
Form Title Binding: Verify that the form_title variable is correctly populated and bound to the text field in the header.
Kind regards,
Henrike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 40 | |
| 21 | |
| 16 | |
| 6 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.