Script for the use of XML data to pre file form open using the player

I need to pre fill five fields when the user opens the form using Acrobat Reader (title, name, address, etc.). The values are saved in an xml data file in the same directory as the form (no database or web services connections). I tested the xml code and form structures using shapes-> manage form data-> import data and everything works fine. Now, I need to emulate this behavior programmatically, so it does not work using only Acrobat Reader. I can't find the magic java script command to import the data (I tried xfa.host.importData and xfa.datasets.data.loadXML without result). Require purchase Pro or Livecycle Server product is not an option. This seems to be a basic requirement, so I hope I'm just being stupid and missing of which is obvious. Thank you.

Hello

Unless you're reader allowing the form with LiveCycle Reader Extensions ES, users with reader will NOT be able to import (or export) XML.

Summary here: https://acrobat.com/#d=3lGJZAZuOmk8h86HCWyJKg

Based on your description that you look at options 2 and 3, users with the reader.

Sorry,

Niall

Tags: Adobe LiveCycle

Similar Questions

  • How should be written the script for the use of the maximum memory of the guest operating system ever?

    How should be written the script for the use of the maximum memory of the guest operating system ever?

    Please teach the name of the object and the type and order, etc.

    You should be able to do it with the cmdlet Get-Stat .

    Something like that

    Get-Stat -Entity (Get-VM $vmName) -Stat mem.usage.maximum -Start (Get-Date).AddDays(-7) | Measure-Object -Property value -Maximum | Select Maximum
    

    This will return the maximum percentage in the last 7 days for the guests, whose name is stored in the variable $vmName.

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • How to write the xml data to a file

    Hi all

    We have a requirement of writing, the xml data in a file in the data directory in the server. Generate xml data using the SQL below.

    SELECT XMLELEMENT ("LINE",
    XMLELEMENT ('CELL', xmlattributes (LIKE 'column name', ' EBIZCZMDL_01'), inventory_item_id).
    XMLELEMENT ('CELL', xmlattributes (AS 'Name of COLUMN', ' EBIZFFMT_01'), attribute29).
    XMLELEMENT ('CELL', xmlattributes ("COMMON" AS "Name of COLUMN"), inventory_item_id |) '' || attribute29 | "ITM")
    "XMLDATA" AS "PRODUCE")
    OF apps.mtl_system_items_b

    When we try to write this query data in a file using UTL_FILE.put_line, the script gives error
    PLS-00306: wrong number or types of arguments in the call to "PUT_LINE '.

    If anyone can help pls...

    Thanks in advance

    The call to dbms_xslprocessor.clob2file is in the cursor for the specific SQL loop.

    This is obviously the problem.
    The file is replaced with each iteration.

    Do not use a cursor at all.

    See the example below, it should be close to your needs:

    DECLARE
    
       l_file_name      VARCHAR2 (30);
       l_file_path      VARCHAR2 (200);
    
       l_xmldoc         CLOB;
    
    BEGIN
    
       l_file_path := '/usr/tmp';
       l_file_name := 'TEST_XREF4.xml';
    
       SELECT XMLElement("xref", xmlattributes('http://xmlns.oracle.com/xref' as "xmlns"),
                XMLElement("table",
                  XMLElement("columns",
                    XMLElement("column", xmlattributes('EBIZFFMT_01' as "name"))
                  , XMLElement("column", xmlattributes('COMMON' as "name"))
                  , XMLElement("column", xmlattributes('EBIZQOT_01' as "name"))
                  , XMLElement("column", xmlattributes('EBIZCZMDL_01' as "name"))
                  , XMLElement("column", xmlattributes('EBIZCZGOLD_01' as "name"))
                  ),
                  XMLElement("rows",
                    XMLAgg(
                      XMLElement("row",
                        XMLElement("cell", xmlattributes('EBIZCZMDL_01' AS "colName"), inventory_item_id)
                      , XMLElement("cell", xmlattributes('EBIZFFMT_01' AS "colName"), attribute29)
                      , XMLElement("cell", xmlattributes('COMMON' AS "colName"), inventory_item_id || '' || attribute29 || 'ITM')
                      )
                    )
                  )
                )
              ).getClobVal()
       INTO l_xmldoc
       FROM apps.mtl_system_items_b
       WHERE attribute29 IS NOT NULL
       ;
    
       dbms_xslprocessor.clob2file(l_xmldoc, l_file_path, l_file_name, nls_charset_id('UTF8'));
    
    END;
    /
    

    BTW, the directory in DBMS_XSLPROCESSOR parameter. CLOB2FILE must be an Oracle Directory object, not a literal path.

  • Script for the conversion of the hyperlinks to the buttons?

    Hello!

    Does anyone know if West a script for the conversion of the hyperlinks to buttons with the action of going to the URL with the same URL, which has been used with hyperlink?

    Here it is:

    /* Copyright 2012, Kasyan Servetsky
    November 29, 2012
    Written by Kasyan Servetsky
    http://www.kasyan.ho.com.ua
    e-mail: [email protected] */
    //======================================================================================
    var scriptName = "Convert hyperlinks to buttons - 1.0";
    
    Main();
    
    //===================================== FUNCTIONS  ======================================
    function Main() {
        var hyperlink, source, sourceText, destination, page, arr, outlinedText, gb, button, behavior,
        barodeCount = 0,
        hypCount = 0;
        if (app.documents.length == 0) ErrorExit("Please open a document and try again.", true);
        var startTime = new Date();
    
        var doc = app.activeDocument;
        var layer = doc.layers.item("Buttons");
        var swatch = doc.swatches.item("RGB Yellow");
        var hyperlinks = doc.hyperlinks;
    
        var progressWin = new Window ("window", scriptName);
        progressBar = progressWin.add ("progressbar", undefined, 0, undefined);
        progressBar.preferredSize.width = 450;
        progressTxt = progressWin.add("statictext", undefined,  "Starting processing hyperlinks");
        progressTxt.preferredSize.width = 400;
        progressTxt.preferredSize.height = 30;
        progressTxt.alignment = "left";
        progressBar.maxvalue = hyperlinks.length;
        progressWin.show();
    
        for (var i = hyperlinks.length-1; i >= 0; i--) {
            hyperlink = hyperlinks[i];
            source = hyperlink.source;
            sourceText = source.sourceText;
            destination = hyperlink.destination;
            page = sourceText.parentTextFrames[0].parentPage;
    
            barodeCount++;
            progressBar.value = barodeCount;
            progressTxt.text = "Processing hyperlink " + hyperlink.name + " (Page - " + page.name + ")";
    
            arr = sourceText.createOutlines(false);
            outlinedText = arr[0];
            gb = outlinedText.geometricBounds;
            outlinedText.remove();
    
            button = page.buttons.add(layer, {geometricBounds: gb, name: hyperlink.name});
            button.fillColor = swatch;
            button.fillTint = 50;
            button.groups[0].transparencySettings.blendingSettings.blendMode = BlendMode.MULTIPLY;
            behavior = button.gotoURLBehaviors.add();
            behavior.url = destination.destinationURL;
    
            hyperlink.remove();
            source.remove();
    
            hypCount++;
        }
    
        var endTime = new Date();
        var duration = GetDuration(startTime, endTime);
        progressWin.close();
    
        alert("Finished. " + hypCount + " hyperlinks were convertted to buttons.\n(time elapsed: " + duration + ")", scriptName);
    
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    function GetDuration(startTime, endTime) {
        var str;
        var duration = (endTime - startTime)/1000;
        duration = Math.round(duration);
        if (duration >= 60) {
            var minutes = Math.floor(duration/60);
            var seconds = duration - (minutes * 60);
            str = minutes + ((minutes != 1) ? " minutes, " :  " minute, ") + seconds + ((seconds != 1) ? " seconds" : " second");
            if (minutes >= 60) {
                var hours = Math.floor(minutes/60);
                minutes = minutes - (hours * 60);
                str = hours + ((hours != 1) ? " hours, " : " hour, ") + minutes + ((minutes != 1) ? " minutes, " :  " minute, ") + seconds + ((seconds != 1) ? " seconds" : " second");
            }
        }
        else {
            str = duration + ((duration != 1) ? " seconds" : " second");
        }
    
        return str;
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------
    function ErrorExit(error, icon) {
        alert(error, scriptName, icon);
        exit();
    }
    
  • Script for the Configuration DVSwitch

    Hello

    Someone at - it a script for the information of VDS on the level of the host which nic is connected to what uplink?

    Also to remove all Exchange created in the VDS switch for the host and then recreate the exchanges as they were after the connection to the host to a vCenter diff?

    Also any script to copy the resource through VCenter pools?

    Thank you

    Suraj Rawat

    The following script will export information of VDS for uplink, the port they are in and what Teddy is used by node ESXi.

    $report = {foreach ($dvSw in Get-VDSwitch)

    foreach ($esx in (Get-View-id $dvSw.ExtensionData.Summary.HostMember)) {}

    $proxy = $esx.Config.Network.ProxySwitch | where {$_.} {DvsUuid - eq $dvSw.ExtensionData.Uuid}

    $pnicTab = @ {}

    $proxy. Spec.Backing.PnicSpec | %{

    $pnicTab.Add ($_.) UplinkPortKey, $_. PnicDevice)

    }

    $proxy. UplinkPort |

    Select @{N = "vdSwitch"; {E = {$dvSw.Name}}.

    @{N = "$vmhost"; E = {$esx. Name}},

    @{N = "vNIC"; E = {$pnicTab [$_]} Key]}},

    @{N = "Uplink"; E={$_. Value}},

    @{N = 'Port'; E={$_. Key}}

    }

    }

    $report | Export Csv C:\dvSw-Uplink.csv - NoTypeInformation - UseCulture

  • script for the murder of session

    Hello
    I prepare a script for the murder of session and I use the following command to generate the script for large number of users. The syntax for the murder of the session is ALTER SYSTEM KILL SESSION * "SID, SERIAL #" * IMMEDIATE. I want my output with SID, SERIAL # values within the single quots *('SID,SERIAL#') *. can someone help me on this?


    Select "ALTER SYSTEM KILL SESSION ' |" SID | «, » || SERIES # | ' IMMEDIATE '. « ; » FROM V$ SESSION WHERE BLOCKING_SESSION IS NOT NULL




    Thanks in advance

    Published by: 793097 on December 14, 2010 05:53
    select 'ALTER SYSTEM KILL SESSION '''||SID||','||SERIAL#||''' IMMEDIATE'||';' FROM V$SESSION WHERE BLOCKING_SESSION IS NOT NULL
    

    Nicolas.

  • How to protect my plugin (for the player) before the application of Adobe

    Hello

    I would like to know how can I protect my plugin technology before showing it to Adobe employees through the application process. Is there a risk of having the stolen idea? Thank you

    You need ot the document than the parts where it interacts with the drive itself.  We want to make sure that you are not adding features to the reader that are already in Acrobat.

    From: Adobe Forums [email protected]<>[email protected]>

    Reply-To: "[email protected]<>[email protected]> ' [email protected]<>[email protected]>" "

    Date: Wednesday, October 26, 2011 04:30:47-0700

    To: Leonard Rosenthol [email protected]<>[email protected]>

    Topic: How to protect my plugin (for the player) before the application of Adobe

    Re: How to protect my plugin (for the reader) prior to application of Adobe

    created by DevAcrohttp://forums.adobe.com/people/DevAcro> in Acrobat SDK - see the discussion complete onhttp://forums.adobe.com/message/3990776#3990776

  • It takes up to 4 minutes for the player switch between library and Rip, and vice versa.

    I run Media Player 11 on my XP machine with spare 120G on the C: memory and 3G - recently, it takes up to 4 minutes for the player switch between library and Rip, and vice versa. I have re-installed twice but no change. No new software has been installed before this time.

    Hello Absno69,

    Thank you for your message.  You mentioned that there were no new software installed before that happens.  Were there any hardware changes or updates?  If this isn't the case, we will perform a system restore to a point that you know that your system is working effectively.  Click HERE for the system restore instructions.
    Please let us know if it did or did not help to solve your problem.
    See you soon

    Engineer Jason Microsoft Support answers visit our Microsoft answers feedback Forum and let us know what you think.

  • Script for the content data store

    Hello

    I'm new in the world of Vmware of scripts.

    I used powercli and real working examples of scripts to find my way.

    I am trying to create an inventory of the existing infrastructure of vmware.

    I have a list of all the VMS and their data store, but I also need a data store content.

    As:

    a list of all the stores of data in a data center.

    Download all the contents of the data store (folders, files vmdk, iso files, other files)

    A list of all the folders / files with VMservers still known in the inventory.

    The goal is to know if there are any files/VMservers on the data store, which are no longer in use and to check if we have duplicate in other data stores files

    Thanks in advance for any assistance.

    Best regards

    Dany

    Take a look at the data store provider

    Try something like

    dir vmstore: \-recurse

  • simple script for the list of all data warehouses properties

    I searched a lot of scripts to get information about my data stores. I can quickly export most the properies of that I need right to a csv file vCenter. A flagrant lack room is the 'space Proviosoned' display of list of data store. I look at the properties of each data store to see this information. Y at - it a script that can get this information?  For this script, I don't reallt care about the news at the virtual machine level.

    Until they solve this problem, you can use something like this

    Get-Datastore | where {$_.Type -eq "VMFS"} | Select Name,
           @{N="Status";E={$_.Extensiondata.OverallStatus}},
           @{N="Device";E={$_.Extensiondata.Info.Vmfs.Extent[0].DiskName}},
           @{N="Capacity";E={"{0:f2} GB"-f ($_.CapacityMB /1KB)}},
           @{N="Free";E={"{0:f2} GB"-f ($_.FreeSpaceMB /1KB)}},
           @{N="Provisioned";E={"{0:f2} GB"-f (($_.ExtensionData.Summary.Capacity - $_.ExtensionData.Summary.FreeSpace + $_.ExtensionData.Summary.Uncommitted) /1GB)}},
           @{N="Type";E={$_.Extensiondata.Info.Vmfs.Type.ToLower() + $_.Extensiondata.Info.Vmfs.MajorVersion}},
           @{N="Last Update";E={$_.Extensiondata.Info.Timestamp}}
    
  • Script for the current date

    I have a javascript document that worked. It prints the current date to the first opening the PDF file in a field called today. Subsequently, the date does not change no matter how many times the PDF file is opened.

    var f = this.getField ("Today");
    If (f.value == ' ') f.value = util.printd ("mm/dd/yyyy", new Date());

    I'm using Acrobat 9 Pro and for some reason this script no longer works in version 9. If someone can help fix this sript, I would be very happy.

    It works fine for me in Acrobat 9.2.0 (under Windows 7). If the field is empty when the form opens, it inserts the current date. If the field is not empty, it does nothing.

    You are absolutely sure that the field 'Today' is empty when you open the PDF file?

  • use Image catalog script for the current document

    Is it possible to use the script to image catalogue for the current document in which we work instead of leaving the mark of script a new document fees for placed images?

    use,

    //ImageCatalog.jsx
    //An InDesign CS6 JavaScript
    /*
    @@@BUILDINFO@@@ "ImageCatalog.jsx" 3.0.0 15 December 2009
    */
    //Creates an image catalog from the graphic files in a selected folder.
    //Each file can be labeled with the file name, and the labels are placed on
    //a separate layer and formatted using a paragraph style ("label") you can
    //modify to change the appearance of the labels.
    //
    //For more information on InDesign scripting, go to http://www.adobe.com/products/indesign/scripting/index.html
    //Or visit the InDesign Scripting User to User forum at http://www.adobeforums.com .
    //
    //The myExtensions array contains the extensions of the graphic file types you want
    //to include in the catalog. You can remove extensions from or add extensions to this list.
    //myExtensions is a global. Mac OS users should also look at the file types in the myFileFilter function.
    main();
    function main(){
      var myFilteredFiles;
      //Make certain that user interaction (display of dialogs, etc.) is turned on.
      app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
      myExtensions = [".jpg", ".jpeg", ".eps", ".ps", ".pdf", ".tif", ".tiff", ".gif", ".psd", ".ai"]
      //Display the folder browser.
      var myFolder = Folder.selectDialog("Select the folder containing the images", "");
      //Get the path to the folder containing the files you want to place.
      if(myFolder != null){
      if(File.fs == "Macintosh"){
      myFilteredFiles = myMacOSFileFilter(myFolder);
      }
      else{
      myFilteredFiles = myWinOSFileFilter(myFolder);
      }
      if(myFilteredFiles.length != 0){
      myDisplayDialog(myFilteredFiles, myFolder);
      alert("Done!");
      }
      }
    }
    //Windows version of the file filter.
    function myWinOSFileFilter(myFolder){
      var myFiles = new Array;
      var myFilteredFiles = new Array;
      for(myExtensionCounter = 0; myExtensionCounter < myExtensions.length; myExtensionCounter++){
      myExtension = myExtensions[myExtensionCounter];
            myFiles = myFolder.getFiles("*"+ myExtension);
      if(myFiles.length != 0){
      for(var myFileCounter = 0; myFileCounter < myFiles.length; myFileCounter++){
      myFilteredFiles.push(myFiles[myFileCounter]);
      }
      }
      }
      return myFilteredFiles;
    }
    function myMacOSFileFilter(myFolder){
      var myFilteredFiles = myFolder.getFiles(myFileFilter);
      return myFilteredFiles;
    }
    //Mac OS version of file filter
    //Have to provide a separate version because not all Mac OS users use file extensions
    //and/or file extensions are sometimes hidden by the Finder.
    function myFileFilter(myFile){
      var myFileType = myFile.type;
      switch (myFileType){
      case "JPEG":
      case "EPSF":
      case "PICT":
      case "TIFF":
      case "8BPS":
      case "GIFf":
      case "PDF ":
      return true;
      break;
      default:
      for(var myCounter = 0; myCounter-1){
      return true;
      break;
      }
      }
      }
      return false;
    }
    function myDisplayDialog(myFiles, myFolder){
      var myLabelWidth = 112;
      var myStyleNames = myGetParagraphStyleNames(app);
      var myLayerNames = ["Layer 1", "Labels"];
      var myDialog = app.dialogs.add({name:"Image Catalog"});
      with(myDialog.dialogColumns.add()){
      with(dialogRows.add()){
      staticTexts.add({staticLabel:"Information:"});
      }
      with(borderPanels.add()){
      with(dialogColumns.add()){
      with(dialogRows.add()){
      staticTexts.add({staticLabel:"Source Folder:", minWidth:myLabelWidth});
      staticTexts.add({staticLabel:myFolder.path + "/" + myFolder.name});
      }
      with(dialogRows.add()){
      staticTexts.add({staticLabel:"Number of Images:", minWidth:myLabelWidth});
      staticTexts.add({staticLabel:myFiles.length + ""});
      }
      }
      }
      with(dialogRows.add()){
      staticTexts.add({staticLabel:"Options:"});
      }
      with(borderPanels.add()){
      with(dialogColumns.add()){
      with(dialogRows.add()){
      staticTexts.add({staticLabel:"Number of Rows:", minWidth:myLabelWidth});
      var myNumberOfRowsField = integerEditboxes.add({editValue:3});
      }
      with(dialogRows.add()){
      staticTexts.add({staticLabel:"Number of Columns:", minWidth:myLabelWidth});
      var myNumberOfColumnsField = integerEditboxes.add({editValue:3});
      }
      with(dialogRows.add()){
      staticTexts.add({staticLabel:"Horizontal Offset:", minWidth:myLabelWidth});
      var myHorizontalOffsetField = measurementEditboxes.add({editValue:12, editUnits:MeasurementUnits.points});
      }
      with(dialogRows.add()){
      staticTexts.add({staticLabel:"Vertical Offset:", minWidth:myLabelWidth});
      var myVerticalOffsetField = measurementEditboxes.add({editValue:24, editUnits:MeasurementUnits.points});
      }
      with (dialogRows.add()){
      with(dialogColumns.add()){
      staticTexts.add({staticLabel:"Fitting:", minWidth:myLabelWidth});
      }
      with(dialogColumns.add()){
      var myFitProportionalCheckbox = checkboxControls.add({staticLabel:"Proportional", checkedState:true});
      var myFitCenterContentCheckbox = checkboxControls.add({staticLabel:"Center Content", checkedState:true});
      var myFitFrameToContentCheckbox = checkboxControls.add({staticLabel:"Frame to Content", checkedState:true});
      }
      }
      with(dialogRows.add()){
      var myRemoveEmptyFramesCheckbox = checkboxControls.add({staticLabel:"Remove Empty Frames:", checkedState:true});
      }
      }
      }
      with(dialogRows.add()){
      staticTexts.add({staticLabel:""});
      }
      var myLabelsGroup = enablingGroups.add({staticLabel:"Labels", checkedState:true});
      with (myLabelsGroup){
      with(dialogColumns.add()){
      //Label type
      with(dialogRows.add()){
      with(dialogColumns.add()){
      staticTexts.add({staticLabel:"Label Type:", minWidth:myLabelWidth});
      }
      with(dialogColumns.add()){
      var myLabelTypeDropdown = dropdowns.add({stringList:["File name", "File path", "XMP description", "XMP author"], selectedIndex:0});
      }
      }
      //Text frame height
      with(dialogRows.add()){
      with(dialogColumns.add()){
      staticTexts.add({staticLabel:"Label Height:", minWidth:myLabelWidth});
      }
      with(dialogColumns.add()){
      var myLabelHeightField = measurementEditboxes.add({editValue:24, editUnits:MeasurementUnits.points});
      }
      }
      //Text frame offset
      with(dialogRows.add()){
      with(dialogColumns.add()){
      staticTexts.add({staticLabel:"Label Offset:", minWidth:myLabelWidth});
      }
      with(dialogColumns.add()){
      var myLabelOffsetField = measurementEditboxes.add({editValue:0, editUnits:MeasurementUnits.points});
      }
      }
      //Style to apply
      with(dialogRows.add()){
      with(dialogColumns.add()){
      staticTexts.add({staticLabel:"Label Style:", minWidth:myLabelWidth});
      }
      with(dialogColumns.add()){
      var myLabelStyleDropdown = dropdowns.add({stringList:myStyleNames, selectedIndex:0});
      }
      }
      //Layer
      with(dialogRows.add()){
      with(dialogColumns.add()){
      staticTexts.add({staticLabel:"Layer:", minWidth:myLabelWidth});
      }
      with(dialogColumns.add()){
      var myLayerDropdown = dropdowns.add({stringList:myLayerNames, selectedIndex:0});
      }
      }
      }
      }
            var myResult = myDialog.show();
            if(myResult == true){
      var myNumberOfRows = myNumberOfRowsField.editValue;
      var myNumberOfColumns = myNumberOfColumnsField.editValue;
      var myRemoveEmptyFrames = myRemoveEmptyFramesCheckbox.checkedState;
      var myFitProportional = myFitProportionalCheckbox.checkedState;
      var myFitCenterContent = myFitCenterContentCheckbox.checkedState;
      var myFitFrameToContent = myFitFrameToContentCheckbox.checkedState;
      var myHorizontalOffset = myHorizontalOffsetField.editValue;
      var myVerticalOffset = myVerticalOffsetField.editValue;
      var myMakeLabels = myLabelsGroup.checkedState;
      var myLabelType = myLabelTypeDropdown.selectedIndex;
      var myLabelHeight = myLabelHeightField.editValue;
      var myLabelOffset = myLabelOffsetField.editValue;
      var myLabelStyle = myStyleNames[myLabelStyleDropdown.selectedIndex];
      var myLayerName = myLayerNames[myLayerDropdown.selectedIndex];
      myDialog.destroy();
      myMakeImageCatalog(myFiles, myNumberOfRows, myNumberOfColumns, myRemoveEmptyFrames, myFitProportional, myFitCenterContent, myFitFrameToContent, myHorizontalOffset, myVerticalOffset, myMakeLabels, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle,  myLayerName);
            }
      else{
      myDialog.destroy();
      }
      }
    }
    function myGetParagraphStyleNames(myDocument){
      var myStyleNames = new Array;
      var myAddLabelStyle = true;
      for(var myCounter = 0; myCounter < myDocument.paragraphStyles.length; myCounter++){
      myStyleNames.push(myDocument.paragraphStyles.item(myCounter).name);
      if (myDocument.paragraphStyles.item(myCounter).name == "Labels"){
      myAddLabelStyle = false;
      }
      }
      if(myAddLabelStyle == true){
      myStyleNames.push("Labels");
      }
      return myStyleNames;
    }
    function myMakeImageCatalog(myFiles, myNumberOfRows, myNumberOfColumns, myRemoveEmptyFrames, myFitProportional, myFitCenterContent, myFitFrameToContent, myHorizontalOffset, myVerticalOffset, myMakeLabels, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle,  myLayerName){
      var myPage, myFile, myCounter, myX1, myY1, myX2, myY2, myRectangle, myLabelStyle, myLabelLayer;
      var myParagraphStyle, myError;
      var myFramesPerPage = myNumberOfRows * myNumberOfColumns;
      var myDocument = app.activeDocument;
      myDocument.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.points;
      myDocument.viewPreferences.verticalMeasurementUnits = MeasurementUnits.points;
      var myDocumentPreferences = myDocument.documentPreferences;
      var myNumberOfFrames = myFiles.length;
      var myNumberOfPages = Math.round(myNumberOfFrames / myFramesPerPage);
      if ((myNumberOfPages * myFramesPerPage) < myNumberOfFrames){
      myNumberOfPages++;
      }
      //If myMakeLabels is true, then add the label style and layer if they do not already exist.
      if(myMakeLabels == true){
      try{
      myLabelLayer = myDocument.layers.item(myLayerName);
      //if the layer does not exist, trying to get the layer name will cause an error.
      myLabelLayer.name;
      }
      catch (myError){
      myLabelLayer = myDocument.layers.add({name:myLayerName});
      }
      //If the paragraph style does not exist, create it.
      try{
      myParagraphStyle = myDocument.paragraphStyles.item(myLabelStyle);
      myParagraphStyle.name;
      }
      catch(myError){
      myDocument.paragraphStyles.add({name:myLabelStyle});
      }
      }
      myDocumentPreferences.pagesPerDocument = myNumberOfPages;
      myDocumentPreferences.facingPages = false;
      var myPage = myDocument.pages.item(0);
      var myMarginPreferences = myPage.marginPreferences;
      var myLeftMargin = myMarginPreferences.left;
      var myTopMargin = myMarginPreferences.top;
      var myRightMargin = myMarginPreferences.right;
      var myBottomMargin = myMarginPreferences.bottom;
      var myLiveWidth = (myDocumentPreferences.pageWidth - (myLeftMargin + myRightMargin)) + myHorizontalOffset
      var myLiveHeight = myDocumentPreferences.pageHeight - (myTopMargin + myBottomMargin)
      var myColumnWidth = myLiveWidth / myNumberOfColumns
      var myFrameWidth = myColumnWidth - myHorizontalOffset
      var myRowHeight = (myLiveHeight / myNumberOfRows)
      var myFrameHeight = myRowHeight - myVerticalOffset
      var myPages = myDocument.pages;
      // Construct the frames in reverse order. Don't laugh--this will
      // save us time later (when we place the graphics).
      for (myCounter = myDocument.pages.length-1; myCounter >= 0; myCounter--){
      myPage = myPages.item(myCounter);
      for (var myRowCounter = myNumberOfRows; myRowCounter >= 1; myRowCounter--){
      myY1 = myTopMargin + (myRowHeight * (myRowCounter-1));
      myY2 = myY1 + myFrameHeight;
      for (var myColumnCounter = myNumberOfColumns; myColumnCounter >= 1; myColumnCounter--){
      myX1 = myLeftMargin + (myColumnWidth * (myColumnCounter-1));
      myX2 = myX1 + myFrameWidth;
      myRectangle = myPage.rectangles.add(myDocument.layers.item(-1), undefined, undefined, {geometricBounds:[myY1, myX1, myY2, myX2], strokeWeight:0, strokeColor:myDocument.swatches.item("None")});
      }
      }
      }
      // Because we constructed the frames in reverse order, rectangle 1
      // is the first rectangle on page 1, so we can simply iterate through
      // the rectangles, placing a file in each one in turn. myFiles = myFolder.Files;
      for (myCounter = 0; myCounter < myNumberOfFrames; myCounter++){
      myFile = myFiles[myCounter];
      myRectangle = myDocument.rectangles.item(myCounter);
      myRectangle.place(File(myFile));
      myRectangle.label = myFile.fsName.toString();
      //Apply fitting options as specified.
      if(myFitProportional){
      myRectangle.fit(FitOptions.proportionally);
      }
      if(myFitCenterContent){
      myRectangle.fit(FitOptions.centerContent);
      }
      if(myFitFrameToContent){
      myRectangle.fit(FitOptions.frameToContent);
      }
      //Add the label, if necessary.
      if(myMakeLabels == true){
      myAddLabel(myRectangle, myLabelType, myLabelHeight, myLabelOffset, myLabelStyle, myLayerName);
      }
      }
      if (myRemoveEmptyFrames == 1){
      for (var myCounter = myDocument.rectangles.length-1; myCounter >= 0;myCounter--){
      if (myDocument.rectangles.item(myCounter).contentType == ContentType.unassigned){
      myDocument.rectangles.item(myCounter).remove();
      }
      else{
      //As soon as you encounter a rectangle with content, exit the loop.
      break;
      }
      }
      }
    }
    //Function that adds the label.
    function myAddLabel(myFrame, myLabelType, myLabelHeight, myLabelOffset, myLabelStyleName, myLayerName){
      var myDocument = app.documents.item(0);
      var myLabel;
      var myLabelStyle = myDocument.paragraphStyles.item(myLabelStyleName);
      var myLabelLayer = myDocument.layers.item(myLayerName);
      var myLink =myFrame.graphics.item(0).itemLink;
      //Label type defines the text that goes in the label.
      switch(myLabelType){
      //File name
      case 0:
      myLabel = myLink.name;
      break;
      //File path
      case 1:
      myLabel = myLink.filePath;
      break;
      //XMP description
      case 2:
      try{
      myLabel = myLink.linkXmp.description;
      if(myLabel.replace(/^\s*$/gi, "")==""){
      throw myError;
      }
      }
      catch(myError){
      myLabel = "No description available.";
      }
      break;
      //XMP author
      case 3:
      try{
      myLabel = myLink.linkXmp.author
      if(myLabel.replace(/^\s*$/gi, "")==""){
      throw myError;
      }
      }
      catch(myError){
      myLabel = "No author available.";
      }
      break;
      }
      var myX1 = myFrame.geometricBounds[1];
      var myY1 = myFrame.geometricBounds[2] + myLabelOffset;
      var myX2 = myFrame.geometricBounds[3];
      var myY2 = myY1 + myLabelHeight;
      var myTextFrame = myFrame.parent.textFrames.add(myLabelLayer, undefined, undefined,{geometricBounds:[myY1, myX1, myY2, myX2], contents:myLabel});
      myTextFrame.textFramePreferences.firstBaselineOffset = FirstBaseline.leadingOffset;
      myTextFrame.parentStory.texts.item(0).appliedParagraphStyle = myLabelStyle;
    }
    
  • Script for the use of rich text change

    I use the script below to add instructions for the use of Textfields. I would like to do the same thing with textfields in the rich text format, but this script no longer works when I put in the field to accept rich text. Can you tell me how to change the script, so it does not work in a ttext field that allows the user to enter rich text?

    MeetingMinutes. #subform [2]. Attendees::Initialize - (JavaScript, client)

    this.execEvent ("exit");
    This.format.Picture.Value = "null {'}" + this.assist.toolTip.value + ""} "";


    MeetingMinutes. #subform [2]. Attendees::Enter - (JavaScript, client)

    this.fontColor = "0,0,0";
    This.font.posture = "normal";


    MeetingMinutes. #subform [2]. Attendees::exit - (JavaScript, client)

    If (this.isNull)
    {
    this.fontColor = "153,153,153";
    This.font.posture = "italic";
    }


    MeetingMinutes. #subform [2]. Attendees::prePrint - (JavaScript, client)

    This.format.Picture.Value = "";


    MeetingMinutes. #subform [2]. Attendees::postPrint - (JavaScript, client)

    This.format.Picture.Value = "null {'}" + this.assist.toolTip.value + ""} "";

    Thank you

    -Don

    Hi Don,

    Similar to your script above, but try this in the event enter:

    if (this.rawValue === this.assist.toolTip.value) {
              this.rawValue = "";
    }
    

    and then exit on the event:

    if (this.rawValue === null) {
              this.rawValue = this.assist.toolTip.value;
    }
    

    ALTER depending on the initialize event and formatting, etc.

    Niall

  • Adobe DC Java Script for the population of conditional field

    I have to write a script in a form that will be contained in a text box and populated by one based on the user by checking a box

    Scenario of

    A form contains two sections, there are two sections Head Office information and accounts payable.  The user saves the headquarters address information for example the street address, city, province, PC, etc.  one moves to section 2 two to record accounts payable information.  The Department accounts payable may be located to one address which is not at the headquarters.  There is a check box labeled "same as headquarters" by checking the box that the user is to identify that this is the same address and I want the form automatically fill the street address, city, province, PC already filled in the section of headquarters.  If the user does not identify the address is the same as the location of the headquarters, the user must manually register the information.

    Is not not a technical developer I'm lost, I tried many sites.  I really miss adobe lifecycle designer and the previous method to create actions.  Help, please!

    My JavaScript to date (sorry it must look not so good):

    this.getField("Same").value;

    If (Same.value! = null) {APStreetAddress.value = HOStreetAddress.value}

    This kind of thing can become a little complicated depending on exactly how you want it behaves. It's simple if you only need the script that will be triggered when the check box is selected, in which case the script of mouse upwards to the box could be:

    Script mouse upwards to the box

    (function () {}

    Do nothing if this check box cleared ix.

    If (event.target.value = 'Off') return;

    Copy the values from the previously filled (probably) the text for the other fields.

    getField("APStreeAddress").value = getField("HOStreeAddress").valueAsString;

    getField("APCity").value = getField("HOCity").valueAsString;

    getField("APPostalCode").value = getField("HOPostalCode").valueAsString;

    Add code to the other fields here

    })();

    Just be sure to use the names of real field.

  • Search for "hello world" script for the passage of form Adobe of page 1 of the form to the page-2-submit

    I want to collect the data in a simple form using multiline text and form fields in the drop-down list and sur-soumettre, display data from the form on page 2 of the PDF document as restructured text.

    I'm not trying to perform calculations or logical decisions with the form data.  That the displacement of the shape for the text displayed on the next page of the PDF file.

    I looked up and down but can't seem to find anything.

    Anyone able to point me in the right direction?

    Thank you.

    For what you are trying to do, it does not appear that the JavaScript code that gave you George is necessary. The script that he gave is rather simple with the added sapce between each item, but with the operator are simplified which each string and space at the end of the previous sValues (a type of operator, which is also in C / C++).

    However, at the point. What you want you can work to simply add a text field for each item and you want to display with the formatting you want (and), then just use a similar something like JavaScript

    getField("Text4").value = getField("Text1").valueAsString;

    to produce the field. Repeat this step for each of the fields to display. I don't know George or someone else will correct the script if I messed it up.

Maybe you are looking for

  • How can I open a rar. file on mac?

    I got a file in rar format and unfortunately I can not open How can I open a rar. file on mac? Thank you for your support

  • FireFox 29.0.1 is sluggest to inadmissible

    I am running Windows XP and two service Packs, and have maximum RAM. The hard drive has at least 60% of available space. I have several programs of malicious software bugs who reported that my system is clean. The hard drive has been defragmented. Wh

  • HP Pavilion Desktop: white screen

    desktop computer HP 3 year and monitor flat screen HP Pavilion 22 xi. A few days after the 10 Windows update monitor began to empty in the middle of using it. No msg error / warning and without cursor, etc., illustrated. Power rest on and unable to m

  • Call Subvi problems

    Hello I am writing a program in which I need a 'pop up' Subvi. The Subvi opens when the user presses a button and closes when it is finished. I do this with a structure of the event. THA main program consists of multiple while loops. When I run the p

  • Want to save the file under a name of controls (Boolean Tick)

    Hi all I have a lot on the front as option 1 Panel_One 2 Panel_Two 3.Panel_Three As the user selects on it this name must be indicated in the name of the file. But its boolean then how to transfer the Boolean tick as file name label? It should also i