These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Make the form name vary from document number

EmilyChang
Registered: Aug 8 2010
Posts: 10

Dear all,
 
I am using Adobe LC Designer ES 8.2 within SAP GUI(T-code:SFP).
 
Is there any way to make the form name vary from one of the field in my PDF form?
For example, field name:DOC_NO, the original form name is ZMM_001
when the DOC_NO passed to the form is N10000001, the PDF file name should be ZMM_001-N10000001
 
I've searched over Internet and forum while no answer be found.
 
Thank you for reading my question in advance.

My Product Information:
LiveCycle Designer, Windows
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
This isn't a trivial thing because of Adobe's PDF restrictions.
But, you can do this with a SaveAs script in a trusted function.
Therefore you will need to install a folder level script into your javascripts folder of your Acrobat/Reader.

Here is an example to describe this method:
http://thelivecycle.blogspot.com/2009/11/save-form-to-specific-directories-and.php

For Reader X with the Protected Mode enabled, you also have to write a custom policy.
http://thelivecycle.blogspot.com/2010/11/custom-policies-for-protected-mode.php

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs

EmilyChang
Registered: Aug 8 2010
Posts: 10
Thanks for your reply, radzmar.

I've copied LCB_SaveAs.js file to Javascript folder.(C:\Program Files (x86)\Adobe\Reader 9.0\Reader\Javascripts\LCB_SaveAs.js)

According to the info you provided on web(LCB_SaveAs.pdf), there are still some variables needed.
The problem is I have no idea where those code be located.
In fact, I don't have any botton like "SAVE" which allows user to push.

Do you have better idea? Thank you again.


By the way, is it possible to give such a dynamic file name within XML Source?If yes, how to do?
I found something seems controlling the file name in XML Source while somehow I am very strange to XML...
EmilyChang
Registered: Aug 8 2010
Posts: 10
The XML Source looked like below:

< xsdConnection dataDescription="data" name="ZMM_001">
< uri/>
< rootElement>data< /rootElement>
< /xsdConnection>
radzmar
Expert
Registered: Nov 3 2008
Posts: 1202
As I said before, this isn't trival.

1. You cannot change the file name with other methods than saving the file under a new name.

2. In my sample you can find a subform "FileParameters" which is essential, cause it holds the whole logic to generate the targets for the saveAs function you execute with the folder level script.
Copy this subform into your form (on the masterpage) and make it "hidden" when you got it working.
It grabs the value of the field "CustomerName" and adds it to the filename.
This is where you can put in your Numbering (Doc_No) for your form.

3. This method only works with a custom saveAs button in the form itself. Remember, you cannot prevent saving of the form from the menu or ctrl+s.

radzmar
LoveCycle Blog
Documents you need:
LiveCycle Designer ES2 Docs