Name of file based on field entry

Derived from the Adobe Acrobat SDK "Javascript for Acrobat API Reference"document: Pg 146 I was able to get the confidence function to work and save a file in a particular way with a non dynamic name. However, I have yet to understand why the document won't save the field entry I specify as filename.

http://www.Adobe.com/content/dam/Adobe/en/DevNet/Acrobat/PDFs/js_api_reference.PDF

Example of 146 1 PG

The Javascript function of confidence recorded in the Acrobat apps folder:

mySaveAs = app.trustPropagatorFunction (function (doc, path)

{

app.beginPriv ();

myDoc = event.target var;

myDoc.saveAs (path);

app.endPriv ();

})

myTrustedSpecialTaskFunc = app.trustedFunction (function (doc, path)

{

Privileged and non-privileged code above

app.beginPriv ();

mySaveAs (doc, path);

app.endPriv ();

Privileged and non-privileged code below

});

JavaScript code that I have on my button click:

xfa.resolveNode ("RA");

myTrustedSpecialTaskFunc (this, "/ c/temp /" + RA + ".pdf");

It returns a file saved with the name of: [object XFAObject] .pdf in the folder specified above.

The Javascript code in the Adobe sample is:

myTrustedSpecialTaskFunc (this, "/ c/temp/mySavedDoc.pdf");

This returns a pdf file in the specified folder with a file name of "mySavedDoc.pdf".

I use MS XP with Adobe LiveCycle Designer ES2 and Adobe Acrobat X Pro

myTrustedSpecialTaskFunc (this, "/ c/temp /" + RA.rawValue + ".pdf");

Kyle

Tags: Adobe LiveCycle

Similar Questions

  • For names of files on LabVIEW

    Hello world

    I was wondering if there is similar functionality on LabVIEW that does the job as the "dir/b" command on windows cmd. It's to get the name of files (in chains) in the directory that I refer to.

    In the end, I want to have a drop down menu where I can read what I have in my folder of files.

    Someone has it all done something like this before?

    Any response would be much appreciated! Thank you very much!

    Stephen

    You can use the folder list function to get all the file/folder names in alphabetical order to a path to a directory:

    Returns two arrays of strings listing the names of all the files and folders found in the path, filtering of tables based on the model and the array of names of files based on the specified datalog typeof filtering.

    EXAMPLE: You can just call with the path and two indicators for file/folder names:

  • How to get all the names of files and extensions to the project Bin

    Is that someone familiar with the question below:

    How do I get the display of file name and file extension in the field of "Media Browser.

    I was working on a plugin, which should detect the files imported into the active project of first.

    I know that first store imported files, while only save a link to the actual path of the clip.

    If I'm not planning to export xml, how can I get these as info?

    HTML5-based panels can get this information, but it is not available via a C++ API (or Objective-C). Write directly to me, and I can give you more information; b b b at adobe dot com.

  • Show the name of file in PDF file

    Hi, hoping for help on what I think is quite a simple question.

    I want to create a single blank page PDF file that has a text field automatically and dynamically finished based on the file name of the pdf document. Thus, for example, if the file is named "My sample file.pdf", the pdf file is displayed "My sample file.pdf" and that is all. If I rename the pdf file in Windows Explorer to "My renamed file.pdf", when I then open the renamed "My file.pdf" file appears.

    I would then insert this PDF a page in an array of existing pdf files as their new No. 1 page to actually be a title for each page created automatically based on their current file name.

    My research suggests that is possible using Javascript in a text field or a form field (although I prefer the text field), however, that I have no experience with Javascript or its implementation of Acrobat, is impossible for me to do. The closest I got is a script that puts the name of the file in the background. Unfortunately this script maintains the new file name that comes to be superimposed on the old watermark of filename, rather that update. For more information the script was: -.

    this.addWatermarkFromText({)

    cText: this.documentFileName,.

    nTextAlign: app.constants.align.center,

    nHorizAlign: app.constants.align.center,

    nVertAlign: app.constants.align.bottom,

    nFontSize: 12,.

    ({nVertValue: 12});

    Ideally, I'd like the script to remove the file extension and if possible to split the output on two lines based on the file name part preceding / fact following a comma in the name of the file (which she would also deprive). For example, if one had a file named 'my sample file created the Monday.pdf', it would display as: -.

    My sample file

    created Monday

    If anyone has any ideas on this, it would be greatly appreciated.

    Regards and thanks in advance.

    Malcolm Mahr

    Add the following JavaScript to the document level:

    // Document-level JavaScript code
    (function () {
    
        // Get the file name of this document
        fn = documentFileName;
    
        // Get rid of the PDF extension
        fn = fn.replace(/\.pdf$/i, "");
    
        // Replace any comma/space combinations with a carriage return
        fn = fn.replace(/\, /g, "\r");
    
        // Set the field value
        getField("fn").value = fn;
    
    })();
    

    Replace "fn" in the statement of getField with the name of your multiline text field. This code runs when the form is opened. If you want to be updated when the file is saved, you can also place in case the Document were spared. Note that some operating systems and other things may have a problem with a comma in the name of the file. Underscore would be a safe alternative.

  • How do I script in DIAdem to include specific lines of code (similar to .ini in LabVIEW files) based on the computer/user?

    I took Basic training courses so DIAdem Advanced and have been scripting for several months.  I am interested in how to include specific lines of code based on the computer.  Told me it would be similar to .ini in LabVIEW files, although I've never used myself .ini files.

    Hi Karen,.

    What do you mean by "includes the lines of code?  Do you mean what happens when you run a command 'ScriptInclude()' or 'ScriptCmdAdd()' in a tiara VBScript?  Or do you mean that you want to run several lines as DIAdem begins, similar to 'ScriptStart() '?

    What do you mean by "computer-based?  Do you mean you want to implement different batch files on different computers, but you are still using the same file (named) command on each target computer?  Or do you mean that you want to implement the same command on all target computers file, but you want different commands to run this file based on the computer on which you are.  In the latter case, how do you determine computer on which you are on - MAC address, logged in user name, or what?

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • name the file exported with date

    Hi, I use this command to export my schema

    exp file = c:\expdat.dmp med/med

    I think that if I use the same command over and over again, it will replace the old file with the new one? right?

    2. I want to name the file exported with the sysdate (date and time)? , and I think it's a way to create a new file and does not replace the old file.

    Thank you

    Here is an example of adding a date for a file name:

    > exp med/med file=c:\expdat.%date:~10,4%%date:~7,2%%date:~4,2%.dmp

    To add as a data and once, you just need something based on time that is unique, so try something like:

    > exp med/med file=c:\expdat.%date:~10,4%%date:~7,2%%date:~4,2%.%time:~1,1%%time:~3,2%%time:~6,2%%time:~9,2%.dmp

  • Read files based on date selection

    Hello

    I have requirement such that the server there are some files for example: text20101231, text20111231, text20121231 and text (Note: exercise file does not have any suffix in its name that is text is file of the current year).

    Now in the user INTERFACE may choose 2 dates: starting from Date and to date.

    According to the date selected files should read in my code.

    For ex: If the user selects the Date from: 13/06/2011 and to this day: 31/11/2012 in the calendar then my code should read only the text20111231 and the text20121231 two files.

    I will also check if the year to date is equal to the current year, it will read the file in which it doesn't have any suffix in its name.

    Please suggest how to read the affected files based on date selection.

    Thank you.

    So I'd start with a cfdirectory to all of the directory, to get all the files.  It returns a query object.  You can then use this to do a query of queries, for example according to your date criteria.

    SELECT *.

    OF getAllFiles

    WHERE 1 = 0

    OR a name like "text #i #%".

    ...

  • How to extract the names of file/URL of all files in a folder (in the same directory of site)?

    I am creating an online music player, simple Flash-based; the user clicks on a song in a DataGrid, and then he plays, simple. I displays the information of the song with the ID3 method in the class 'sound', but I don't want to hardcode all the songs in the ActionScript code, because I change them. I created a folder "tracks" in the directory of the site; How can I extract the names of the files in this folder without knowing how many there are by nature, and files without knowing the URL?

    Use PHP or another script server to read the contents of the folder and to deliver the names of files for Flash in the form of data (xml or txt).

  • My music search by name of file to a list?

    iTunes 12.3.2.x

    I used to be able to do very easily in iTunes, but cannot find a way to make this more.

    Here's an example - I have many different guitars scratching records, and one of them is a Carvin DC125.  So the recordings made with this guitar I would make sure that "DC125" was the name of file.  When I search in 'My music' 'DC125', I can always find a list of files, but this list only presents under the search box until I have select one of the files, and then disappears from the list.

    iTunes USED to let me "DC125" as a search, then he just showed these files in a list and I could jump around in this list at will without having to do the research again.

    There is no other useful to filter metadata that with, the artist is 'unknown' and there are thousands of files with this info.  I tried to make playlists as well, but for what its worth the old search function has been much better and smoother for this sort of thing.

    Dang-as usual, I found the right answer after frustrated enough to ask for help!

    If someone stumbles across this thread the response was:

    (1) research 'My Music' as expected.

    (2) on the left side of iTunes - click on «All artists»

    It gave me a list that resembles an album I can navigate at will as I used to see.

  • HP Pavilion 360: How can I change the host name of files?

    I need to chance the host name of file on my PC I do not know how?

    Ok. Thank you. I'll give it a try!

  • "Name of file or assembly ' System.Windows.Forms, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = B77A5C561934E089", or one of its dependencies was not found

    Hello

    Im having a problem. I write a program in Visual studio 2008 c# for Windows CE language in a machine of liliput.

    When I run the program in windows 7, I have no problem, but when I try to run my program in Windows CE I get the following exception (the projecto for Windows CE was created to run in this operating system):

    MissingMethodException is unmanaged

    "Name of file or assembly ' System.Windows.Forms, Version = 2.0.0.0, Culture = neutral, PublicKeyToken = B77A5C561934E089", or one of its dependencies was not found.

    The references from my program are:

    mscorlib.dll (Version 2.0.0.0) (length versio 2.0.0.0) - this dll do not exist in the program for Windows 7, appeared when I created the project for windows CE

    NationalInstruments.Vision.dll (Version 11.0.35.102)

    NationInstruments.Vision.Common.dll (Version 11.0.35.102)

    System.dll (Version 2.0.0.0)

    System.Data.dll (Version 2.0.0.0)

    System.Deployment.dll (Version 2.0.0.0)

    (Version 2.0.0.0)-System.Drawing.dll

    System.Windows.Forms.dll (Version 2.0.0.0)

    System.XML.dll (Verision 2.0.0.0)

    Throughout this reference is the Version of the Runtime: v2.0.50727 (it is the versions of Windows CE of liliput machine can run?)

    Can someone help me? I don't know why I get this exception

    Thank you for your help

    Hello UH and thank you for your message.

    I'm sorry I don't really understand what you are doing, you develop applications with Visual Studio 2008 and then deploy it on Windows CE or use directly in windows THIS? (I ask that, because Visual Studio is not supported on Windows CE: http://www.microsoft.com/en-us/download/details.aspx?id=7940)

    In addition, what device OR do you use? What is the fat of your project?

    Thanks for the responses,

  • I have this spl55.tmp file in my Windows/temp folder. I have also several other "sp" name of files in the same folder. Where did they come from?

    I have this file in my Windows/temp folder. It is 9.8 MB. I have also several other "sp" name of files in the same folder. Where did they come from? Can I just delete them?

    Thank you

    Paul

    If I'm not mistaken reference you the files are temporary files from the print job, you made and can be deleted safely.

  • 2 separated registered photos with the same name of file/number.

    How can I separate 2 or more photos with the same name of file/number. Consult us in the case that I see a photo and when I open it I see a different picture. The second photo is not the case in the folder, but still I need to save. It seems they are crushed.

    How can I separate 2 or more photos with the same name of file/number. Consult us in the case that I see a photo and when I open it I see a different picture. The second photo is not the case in the folder, but still I need to save. It seems they are crushed.

    =============================================
    FWIW... If a picture was crushed (replaced), it is unrecoverable.

    Are you saying that the vignette does not match the full size photo?

    How_exactly_are you look at one picture?

    John Inzer - MS - MVP - Digital Media Experience - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

  • Can I globally change the names of files and or directory to lowercase to uppercase?

    in Windows XP or in Windows 7, globally change the names of files and or directory to lowercase to uppercase?

    A single configuration change probably will not accomplish this.

    Your best bet is probably the freeware "Bulk Rename Utility" program which has a section dedicated to change the case of file names.

    Bulk Rename Utility: <> http://www.bulkrenameutility.co.uk/Main_Intro.php >

    HTH,
    JW

  • Want to copy and paste the names of files only, not the content

    I have organized hundreds of files in several folders of dozens and that you must first create a list or map of all files.  I want only the names of files, not other thing.  I found some freeware that seems designed to do this, but am reluctant to download.  Can it be done without additional software?  If I can't do the regular windows environment, someone suggest what software is the easiest to achieve?

    There are a lot of reliable freeware websites.  What program have you found, and this web site is on?

    To do the work of the normal Windows environment, click Start > all programs > Accessories > command prompt and enter these commands:

    CD /d "" path ".
    dir/b/s >"" file
    ".

    where:

    path = full path to the file
       file = name of the file to write

    For example, to create a list of files in My Documents and write it to a file named My Documents.txt :

    CD/d "C:\Documents and Settings\Utilisateur\Mes Documents"
    dir/b/s > "My Documents.txt."

    The /s parameter lists the files in the selected folder and all its subfolders.  The omit if you want just the files in the selected folder. Boulder computer Maven
    Most Microsoft Valuable Professional

Maybe you are looking for