How to get the path of PDF file?

Hello

Adobe Livecycle ES2 V9

Here is the code that I currently use (postSave):

var fileName = event.target.documentFileName;

at this point, fileName is (myForm.pdf), there is no path to the file

fileName = fileName.substring (0, fileName.indexOf("."));

xfa.host.exportData (".") ("/" + name + ".xml", 0);

In fact, when the user saves the document PDF an XML file is automatically saved in the same directory with the same name as the PDF file.

The problem is event.target.documentFileName only gets the pdf and the extension (ex: site_checklist.pdf)

If the client opens two or more PDF files, it tries to export the XML file in the directory of the first open PDF file (or the last, it have not narrowed down).

How can I get the path of the current PDF (not PDF more recently opened)?

I can find no documentation for .documentFileName, I tried documentFilePath too.

The property you are looking for is the 'path' property: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.411.html

Here is the documentation for documentFileName: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.389.html

Tags: Adobe LiveCycle

Similar Questions

  • How to get the path of the file attached to appliction

    Hello

    I use jdeveloper 11.1.1.3.0

    I have a folder named "Img" attached to my application, I need to get the path of this file running. I used code below to get:

    String relativeWebPath = "/ Img";

    FacesContext facesContext = FacesContext.getCurrentInstance ();

    ServletContext servletContext = (ServletContext) facesContext.getExternalContext () .getContext ();

    String absoluteDiskPath = servletContext.getRealPath (relativeWebPath);

    When I run the application on integrated WebLogic, the true path returns:

    C:\Users\eslami\AppData\Roaming\JDeveloper\system11.1.1.3.37.56.60\o.j2ee\drs\testAddr\ViewControllerWebApp.war\Img

    but when I run the application on server Stanalone, returns null.

    How can I get this path on the server Stanalone?

    Habib

    Hello

    ServletContext.getRealPath () returns null if the servlet container cannot translate the virtual path to a real path for any reason any (for example, when content is made available a .war archive).

    To do this, add the following line in the weblogic.xml:

    true

  • How to get the path of the vmdk to a VM stop file?

    Hi guys,.

    How to get the path of the vmdk to a VM stop file in ESX Server via the VIX API?

    I try to get it via the VixVM_ReadVariable() function. but it seems that this function requires that the virtual machine is power on.

    I don't want to go the virtual machine started, I just want to know if I can get the path of the vmdk file when a virtual machine is power off.

    Thanks in advance.

    Sorry, I don't have any samples.

    However, if you look at the layoutEx of the managed object VirtualMachine field, you will see that the VirtualMachineFileLayoutEx data object has a field "files" which should contain the paths of affected files.

    I hope that it should be able to help get started.

  • How to get the path or the file name of getChild

    Hey everyone, good day!

    Is - anyone here know how to get the path or the file name of an object inserted into the scene?

    Here's the scenario:

    I am developing a flash application, which allows the user to insert background to the scene to help her browse and select using the FileReference in flash. I inserted some image the user successfully choose, but what I'm trying to make, is that if the user clicks on save, the background image it has chosen will be copied to a different folder on the web (file upload). So I need to know the path and the file name of the background image.

    Here is my AS3 code:

    for (var i: uint = 0; i < container.numChildren; i ++) {}
    trace ('\t|\t' + i +'. \t name:' + container.getChildAt (i) .name + "\t type:" + typeof (container.getChildAt (i)) + "\t" + container.getChildAt (i));
    }

    ------------------------------------------------------------------------------------------ -----

    Here is the message trace of the code above:

    |     0 name: instance120 type: object [object Loader]

    ------------------------------------------------------------------------------------------ --------

    Any help here? I thank in advance.

    The Loader class has a property contentLoaderInfo (an instance of the class LoaderInfo) that contains information, that you are probably after, including the url of the content that has been loaded...

    Loader.contentLoaderInfo.url

  • How to find the path of a file

    Hello

    I have Windows 7 Starter.

    The search utility can be used to search for files by using the ' * ' wildcard, but unfortunately it does not show the path for no results.

    I would like to know how to find the path of a file of my choice.

    For example, I record a radio on the internet, which is then saved as "MP3". Now, I want to edit such a file, but I need to know where the file is actually stored. Simply access within a 'library' does not show me where the file is actually located.

    How to discover all paths where a particular file format?

    I hope to receive a response to this request.

    Kind regards

    Rayt333

    An option for the search utility see the paths for all of its results, would be useful.

    Hi Ray

    Overall view for the search folder for Detailsof Windows Explorer , by using the View Menu on the right side of the toolbar.

    Click on the last name column heading and select the folder item.

    If you do not see the folder item, click other, scroll and select the folder item. This will add the folder column.

    Use the left mouse button to drag the folder column to the left, next to the column name .

    Now, when you perform a search, the folder column will show the path of each file found.

    Concerning

  • How to get the JOINT-2 log file

    Hi, we installed in the 6500 system JOINT-2 cat. Anyone know how to get the syslog JOINT-2 file? and how config to send the log to syslog server? I know that these two questions are quite simple, but I've yet to find answers.

    Any help would be greatly appreciated.

    You can get the JOINT events to the CETS format. Using the Manager of IPS or other tool to collect these logs.

  • How to select the path to a file icon button to a table?

    I have a SYSTEM_PATHS table name. All physical access paths as 'where the forms of execution are located' or 'where performance reports are located' are stored in its ranks for example (C:\HRMS\FORMS\)
    I memorized the path of the icon files (.ico) inside. The forms of execution can take the path of the icons for the buttons of this table. And access the icon of the chosen path. I use forms 6i. Normally, I put the path of the icon files in the nerve to property of the button as (C:\HRMS\ICON\). But now, here, I don't have a path but its in the column of a table. How to select the path to a file icon button to a table using forms 6i?

    Hello Gul,

    have you tried

    set_item_property('Button name',ICON_FILENAME,);
    

    Concerning
    Marcus

  • How to get the path of the directory component in custom filter

    How to get the path of the directory component in a custom filter?
    final String absoluteComponentPath = CompInstallUtils.computeAbsoluteComponentLocation( "yourComponentName" );
    
  • How to get the path page dynamically

    Hello.

    How to get the path to the current page in the processRequest of the controller method? e.g. "/ oracle/apps/ak/sandbox sand/webui/SamplePG.

    -wheleph

    pageContext.getParameter ("page");

    This line will give you exactly what you want...
    Thank you
    Annapurneswar

  • How to get the path of the checkpoint of the layer file?

    Hi all:

    the layer has that one video file, is there a way to get the full path of the file? I read the SDK from the AE file, but I can't find the way to get the path of the layer file.le ITEMSUITE8 AEGP_GetTypeName/AEGP_GetItemName/AEGP_GetItemComment, but don't have AEGP_GetItemFilePath.any suggestion will be thankful!

    I think that you need to access the memory behind the handle first:

    AEGP_MemHandle pathH;

    A_UTF16Char * filePath;

    ERR (suites. FootageSuite5()-> AEGP_GetFootagePath (footageH, 0, AEGP_FOOTAGE_MAIN_FILE_INDEX, & pathH));

    ERR (suites. MemorySuite1()-> AEGP_LockMemHandle (file_pathH,reinterpret_cast (& filePath)));

    now the path must be accessible via filePath!

    ERR (suites. MemorySuite1()-> AEGP_UnlockMemHandle (pathH));

    ERR (suites. MemorySuite1()-> AEGP_FreeMemHandle (pathH));

  • How to get the .rbf and .through files?

    Hello I am currently working on the project, which provides for automatic deployment and launch programs everchanging.

    Ev3 are scattered in different schools. I wrote a simple script that can download a file and then send it to ev3 via wifi.

    But I'm currently stuck on how to get .rbf and Labview .through files.
    I know that I can deploy .vi using the target to ev3 and then upload these files to the PC, but I can't add script.
    Is it possible to compile .vi to the file?

    Sorry, try this

  • How to get the path of placed location plugin

    Hi all

    I want to get the path to my plugin location placed in my custom plugin code.

    supporse my plugin custom:

    C:\Program Files\Adobe\Adobe Illustrator CS5.1\Plug-ins\MyCustomPlugin\MyCustomPlugin.aip

    Is that any API is there who can tell me my plugin path or the path of the directory.

    Concerning

    Ashish.

    Yes, what you want is SPPlugs.h, found in the pica_sp folder. Specifically, you want to GetPluginFileReference(), which takes a SPPluginRef, which is located in any message sent to the plugin. There is always a member of any message:

    SPMessageData d;

    In this (SPMData.h, also in the pica_sp folder), you will find:

    struct SPPlugin * auto;

    That's what you go to GetPluginFileReference(). The result will be placed in a SPPlatformFileReference, which you can pass to the constructor of an ai::FilePath (IAIFilePath.hpp in the main folder of the SDK) and then you will have a pretty nice object where you shoot the full path.

  • ADF: How to get the path of the file when you use component InputFile

    Hi all

    I use jdeveloper 11.1.1.5.0 version.

    in my case, I created program Mail Client mail where I used the ADF InputFile component for attach file mail.

    but problem is this return path only component InputFile from the file (only the filename get)

    and in my mailer class DataSource uses the full path name of file access.

    UploadedFile uploadfile=(UploadedFile) actionEvent.getNewValue();
         String fname= uploadfile.getFilename();//this line only get file name.
    

    so, how can I get the full path using adf InputFile component or any other way to respond to my request.

    Thank you

    Manish

    Try this (I did not, so I can't promise it will work):

    MimeBodyPart messageBodyPart = new MimeBodyPart(uploadFile.getInputStream());
    messageBodyPart .setFileName(uploadFile.getFilename());
    messageBodyPart.setContent(multipart);
    

    It does use the inputStream from the downloaded file as the content of the file attached. You shouldn't need a full path, since you're not going to use a file object to provide the content.  And it shouldn't be necessary to define the DataHandler.

    But if that doesn't work, I go back to my first answer.  Use uploadFile.getInputStream () to get the inputStream from the downloaded file, create an outputStream to write the file to the file system of the application server.  Then you have a file with a known path that you can subscribe to the DataHandler.  You can delete the file when you're done with him.

  • How to get the path (using &lt; input type = "file" / &gt;)

    Hello world

    I create a HTML form that has an entry of type = "file".  This will give you a dialog box browse for your user to search for a file on the operating system.

    And my code:

    function handleFileSelectForMyShop (evt)
    {
    var blnFileReaderSupported = false;

    Try
    {

    Debug.log ("handleFileSelect", "start handleFileSelect");
    reader of var = new FileReader();
    blnFileReaderSupported = true;
    var files = evt.target.files;
    var size = files.length;

    Debug.log ("handleFileSelect", "handleFileSelect # selected files:" + size, debug.info);

    for (var i = 0; i)< size;="">
    {
    Debug.log ("handleFileSelect", "in the handleFileSelect analysis the index file" + i, debug.info ");
    var f = files [i];
    Reader.OnLoad = (function (theFile)
    {
    Debug.log ("handleFileSelect", "start reader.onload", debug.info);
    return Function
    {
    Debug.log ("handleFileSelect", "start Function", debug.info);

    Debug.log ("handleFileSelect", "reading file" + theFile.name + "(" + theFile.size + "") "" + theFile.type, debug.info);

    If (theFile.type.match ('image.*')) {}
    var path = e.target.result;
    alert (path);
    create the path

    } else {}
    jAlert ("Please select photo!', 'Error'");
    }
    };
    })(f);

    If ((f.type.match ('image.*')) |) (f.type.match ('audio.*')) | (f.type.match ('video.*')))
    {
    Debug.log ("handleFileSelect", "in handleFileSelect call reader.readAsDataURL for type" + f.type, debug.info);
    Read in the media file in the form of a data URL.
    reader.readAsDataURL (f);
    }
    }

    Debug.log ("handleFileSelect", "Complete", debug.info);
    }
    {} catch (e)
    Debug.log ("handleFileSelect", e, debug.exception);
    If (! blnFileReaderSupported)
    {
    Alert('Error.) The FileReader API is not supported. ") ;
    }
    }
    }

    function doPageLoad()
    {
    Try
    {
    ELE var = document.getElementById ('txtFile_staffInfo');
    If (ele)
    {
    ele.addEventListener ('change', handleFileSelectForMyShop, false);
    }
    imgSelectPictureClick = 0;
    }
    {} catch (e)
    Debug.log ("doPageLoad", e, debug.exception);
    }
    }

    window.addEventListener ("load", doPageLoad, false);

    Note: And alert (path) leads to a Base64 string! It is not a path of the image that I browse a Spain file on the operating system.

    I want to have a full path of the file. For example: file:///accounts/1000/appdata/WebWorksAppTemplate.testa3NBcHBUZW1wbGF0ZSAgICA/shared/camera/image01.jpg

    I hope to see your reply soon!

    Thank you and best regards,

    A Pham

    A Pham

    I think that you can not get the absolute path of a file due to browser security, when you use the

    It's something that you need probably a PlayBook extension for.

  • How to get the path applet?

    Hi all

    I want the path of the applet in a class.
    My applet class is abc.java in this file that I can get way using the GetCodeBase method. But the real problem is that I invoke a class of abc.java to xyz.java. So how do applet path in xyz.java. It is not support GetCodeBase method.

    If anyone knows please write.

    Thank you
    -Barros

    Barros says:
    .. If anyone knows please write.

    When people help you with problems, it pays to acknowledge the assistance. After all, this isn't your personal assistance, it is a community of developers who provide advice & tips for free.

    Thank you

    Thanks expresses better by scoring responses as 'useful' or 'correct' and markers such as "answered" if they are. This brings me...

    -Barros

    .. so far I have provided suggestions on * 3 * of your son. If you don't think that my advice is of any help, please say it, & I will stop wasting my time. OTOH if it helped you, mark the answers and discussions as a result.

    TIA

Maybe you are looking for

  • Trigger on position two counters

    Hello I have a request I want to compare the results of the two counters (used as station x 4). One(C#1) is connected to a system under test, and the second (c# 2) connected to a reference system. I use a USB-6221. My main goal is to get a good synch

  • dvdmaker has no dvd burner and loses the stord preps, does not move to the next

    was some kind of computer glitch, an infestation of microsoft, they phoned and sorted the problems, but since I can't use my dvd maker and have problems with very slow internet

  • Acer 8572G - 6647 card upgrade memory

    I've had this computer for 2 or 3 years, and I would say that it is finally slowing down. I would say that I am a user of power but very ill, but I think that my patience is wearing thin. So I'll add a ssd and some more memory. Where can I find speci

  • eMachine battery won't charge

    My labtop keeps showing a red x on the screen battery the charger is plugged in but not charging how do I know if it's the battery or the charger

  • export work does not correctly only to exports 3/4 of my video.

    For some reason when I export video. It exports only about 3/4ths of it. It will say its 100% exported, but when I look at the back room he cut medium spray for about 3/4. I try to uninstall and reinstall contributing for about a week and now I have