on 11-23-2010 10:10 AM
Dear specialists
I'm working on a PDF Print Form in transaction SFP. On the paginations tab of the object palette you can set the attribute Place, among other things, with "Following Pervious" or "Top of next Page".
This attribute is responsible for deciding whether the content of this form
is placed at the end of the previous page, or if a new page is started. If I set this attribute
statically and deploy the PDF, everything works as expected.
What I would like to do is, to set this value dynamically during JavaScript initialize event. I've tried different combinations but non of them worked:
----- data.Seite_4::initialize: - (JavaScript, server) ---------------------------------------------
if($record.BERICH_MODULAR.MODULAR.value == "X" && $record.BERICH_MODULAR.KAPITEL.value != "X"){
//this.break.before = "contentArea";
//this.break.startNew = "1";
//this.breakBefore = "pageArea";
//this.breakBefore.startNew = "1";
//this.break.before = "pageArea";
//this.break.before.startNew = "1";
this.break.before = "Seite_4";
this.break.startNew = "1";
}
This is the Adobe reference to breakBefore:
http://help.adobe.com/en_US/livecycle/9.0/designerHelp/index.htm?content=000874.html
Do you have any idea what I'm doing wrong?
Thanks allot for your help.
Daniel
Hello Otto
This is a clever approach. If there is no way to set this attribute by javaScript, I will do it your way.
Thanks for that.
In the meantime I came across some training content from BC480 (PDF Based Printforms) and there is an example going like this:
//formCalc
$.break.after = "contentArea" ; page break after current subform
; can be processed only for subforms
But this doesn't work either...
Could this be a bug? Or any other ideas?
Cheers
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried it and it definitely did a page break, although I didn't find it very useful for my particular situation. The main part of my page was a sub-page/sub-form named "Body." It was contained in a page that I renamed to Content_Area (I believe it was named "contentArea" when I first created the form). Here is an example:
Body.break.after = "Content_Area" //page break after content area
No idea how to do it your way, but I can tell you about mine.
I use empty subform (height = 0, no children), place it where I need a conditional break, make it hidden, set top of next page for this special subform and write a script.
It works like this: when I need a page break, I use script to make the subform visible and only then the pagebreaks happen.
A workaround, but works just fine.
Otto
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.