Ok, I was able to combine your solutions to a working prototype.I am
using a dummy-subform in "repeating_subform", which has the target
"last_page". This subform is hidden by default.With your script from
above I now determine which subform-instances are on the last page, and
set the dummy-subform to "visible" for all corresponding instances. Then
I use relayout() to apply the changes.This way I have the last page on a
different master page and can now use a different paper tray.Thanks
Hi Brue,ok, I understand now what you meant.Well, if deletePages() would
work, the script could be as
1);xfa.layout.relayout();(Pseudocode)Having each page duplicated sounds
costy, but I guess it's a costy requirement anyways.Do you mean
duplicating the whole XDP file, or the Form WITHIN the file?
Hi Brue,thanks again for the extensive answer and
explanation.Unfortunately the script does only help when deleting the
last page.We have masterpages FIRST, NEXT and LAST.If we remove every
element except the ones on the last page, the content would be printed
on masterpage FIRST instead of LAST.Is there maybe a way to switch
masterpages at runtime?It would be way easier if the deletePages(n-1, 1)
command would still be available .Is there a similar command available?
Can we maybe use the pageSe...
It's called Adobe Document Services (ADS), a cross-product of Adobe and
SAP. I don't know how the script can delete the last page or all but,
and that's exactly what I'm trying to find out. Any ideas on that?
Hi Brue,what I'm trying to do is to split the document into last page
and everything but last page.Since I can't use external tools for this
(like PDF Toolkit / PDF Toolbox), I have to find a script to do just
that.I hope it's clearer now.A button will not work for us, since the
form is not interactive.So I really just need a command to delete the
last page from the resulting PDF, or every page before that.
Thanks again for your input.Same problem. I've tried to hide all items
from the second-last page (... == pageCount - 1).With 4 pages of
subforms, pages 3 and 4 are now empty, but are still printed.Is the
event ready:layout maybe too late?The page count is only available at
this event though, right? At least the script doesn't work in
Hm... that sounds like the right direction.If I do that now, the last
page does not contain any items, but it's still printed.Any idea on how
to avoid the blank page?Can I access the page and set the presence to
hidden? If so, how?
We can create a second master page, but we would need to tell the
content when to switch to the second master page.Here's the
structure:Repeeating_subform will eventually extend to the last page.How
do I tell repeating_subform to use my second masterpage "last_page"?
Hi Bruce,thanks for your explanation.To use that option, our last page
would need a different page size, correct?How can I tell the last page
to be on a different master page, or a different page size?Best