Confidence for app.newDoc function always returns the undefined value

Hello

I'm doing a script activated by button.  Its purpose is to save a copy of the first page (form data erasure) in its own file in the same path as the open document.  As part of that I had to create a trust to cover the privileges of the app.newDoc function.  I have the following:

trustedNewDoc = app.trustedFunction (function (nWidth, nHeight)

{

app.beginPriv ();

app.newDoc (nWidth, nHeight);

app.endPriv ();

});

This was recorded in a file called "newdoc.js" in the "app" of javascript.  I closed my Acrobat Pro XI and restarted.  As soon as I try to activate a button with just: "myDoc = trustedNewDoc var (500,500);", it opens the document as specified, but I get "undefined" returned to myDoc - that avoids manipulation of the Fryer.

If I run the same line of the console, it also returns the value undefined.  Running "myDoc = var app.newDoc ();" also returns undefined, but just "app.newDoc ()"; only returns '[Doc]' - even if ' trustedNewDoc (500,500); "alone is still undefined.

In any case, I feel like I'm missing something fundamental, even if I found some guides suggesting to do exactly what I have it implemented.  I am pretty sure I have everything entered correctly and followed all the steps, so at this point I'm stumped.  Any help would be greatly appreciated!

Thank you

Mike

Thanks Gilad, that was exactly what he needed!  And thanks for getting back to me so quickly.  Now, I really wish I would have asked this question more early yesterday after spending hours trying to find a solution.

Unfortunately there aren't really examples I found where a value was returned.  Maybe it's the good sense and I should have better, but I thought that the value has been returned by other means.  In any case, it's great to work with your help!  Now, I have a separate question, with what I need to see if I can get help. Hey, great work and thank you again!

Tags: Acrobat

Similar Questions

  • getElementsByTagName("input").value); Returns the undefined value

    Help, please! The API DW getElementsByTagName() function returns no value.

    I'm defining the following form part of an extension of bar insert:

    (skip the usual of head)
    < body onLoad = "reportLabel ()" >
    < form >
    < table border = "0" height = "100" width = "100" >
    < tr valign = 'of basic">
    < td align = "left" nowrap >
    A label:
    < input type = "text" name = "label_field" value = "" id = "alabel" > "
    < table >
    < /tr >
    < /table >
    < / make >
    < / body >
    < / html >

    And the following JavaScript code:

    function reportLabel() {}

    Read the label of meta tag in the active document
    var dom = DW.getDocumentDOM (); get the dom of the current document
    var label = dom.getElementsByTagName ("meta");
    for (counter = 0; counter < label.length; counter ++)
    {
    If (label [meter] .name is 'Label')
    Alert (label [Counter]. Content); It works, the function reads the elements of document of the user very well

    But how to find the extension form input field so that I can pre-populate it with the label?

    Alert (document.getElementById("Alabel"). (Name) function undefined, grrr
    Alert (document. GetElementsByTagName("Input").value); returns undefined-> This is the function I want to use
    Alert (document.hasChildNodes ()); Returns true, then the DOM document is readable
    Alert (document.childNodes.Length); Returns 2
    Alert (document. Forms.Length); Returns the value 1
    Alert (document. Forms.childNodes.Length); has no childNodes property
    }
    }

    Thank you!
    -Scott

    getElementsByTagName() returns an ARRAY - so you can not use a point
    operator about it as you have. You have to do, for example:

    getElementsByTagName ('INPUT') [0] .value etc.

    fMichel brandt

    srowe3 wrote:
    > Please help! The API DW getElementsByTagName() function returns none
    > values.
    >
    > I'm defining the following form part of an extension of bar insert:
    >
    > (skipping the usual of head)
    >
    >


    >
    >
    >
    >
    >

    > A label:
    >
    >

    >

    >
    >
    >
    > And the following JavaScript code:
    >
    > function reportLabel() {}
    >
    > / / Read the meta tag tag in the active document
    > var dom = DW.getDocumentDOM (); get the dom of the current document
    > var label = dom.getElementsByTagName("meta");
    > for (counter = 0; counter)< label.length;="">
    > {
    > If (label [meter] .name == "Label")
    > / / alert (label [counter] content); It works, the function reads the
    > the user of the document elements very well
    >
    > / / But how to find the extension form input field so that I can
    > Pre-populate it with the label?
    >
    > / / alert (document.getElementById("alabel").name); function undefined,
    > grrr
    > / / alert (document.getElementsByTagName("input").value); Returns
    > undefined---> this is the function I want to use
    > / / alert (document.hasChildNodes ()); Returns true, then the DOM document is
    > readable
    > / / alert (document.childNodes.length); Returns 2
    > / / alert (document.forms.length); Returns the value 1
    > / / alert (document.forms.childNodes.length); has no childNodes property
    > }
    > }
    >
    > Thank you!
    > - Scott
    >
    >

  • Pass data to jsx function returns the undefined value

    Probably a noob but question why I get defined during the passage of data to a jsx function?

    JavaScript

    var csInterface = new CSInterface();
    csInterface.evalScript ("myFunc ('ack')");

    ExtendScriptfunction

    {myFunc (property)}

    Alert ("connected myFunc get property value:" + property);

    }

    Things work fine if I just a life normal functionc everything without the passage of a variable.

    Found myself in the syntax

    csInterface.evalScript ("myFunc (" "+ ack +" ")");

  • ListItemData.value returns the undefined value

    Hi guys

    I'm having a weird problem with a ListView.

    I made a custom, based on the sample Image Loader

    My Custom Image Loader class has more variables and several accessors:

        // The accessor methods of the properties
        QVariant image() const;
        QString label() const;
        bool loading() const;
    
        //-- MY ACCESORS
        QString desc() const;
        QString target() const;
        QString title() const;
        etc...
    

    In addition, the example uses a QListDataModel, and in my application, I use a GroupDataModel.

    The following code works. Is my earlier version in which I didn't load the images on the web:

    (lst is a QVariantList loaded from a JSON)

        _dataModel = new GroupDataModel(QStringList() << "porder");
        _dataModel->setParent(this);
    
        //-- insert the JSON data to model
        _dataModel->insertList(lst);
    
        //-- make the model flat
        _dataModel->setGrouping(ItemGrouping::None);
    
        //-- find cascades component of type ListView with an objectName property set to the value 'listView'
        //-- assign data model object (m) to its GUI representation object (list_view)
        if(_listView) _listView->setDataModel(_dataModel);
    
        _dataModel = new GroupDataModel(QStringList() << "porder");
        _dataModel->setParent(this);
    
        //-- insert the JSON data to model
        _dataModel->insertList(lst);
    
        //-- make the model flat
        _dataModel->setGrouping(ItemGrouping::None);
    
        //-- find cascades component of type ListView with an objectName property set to the value 'listView'
        //-- assign data model object (m) to its GUI representation object (list_view)
        if(_listView) _listView->setDataModel(_dataModel);
    

    I tried to fill the list with my custom class by replacing "_dataModel-> insertList (lst);" with this code:

    foreach (QVariant vItem, lst) {
        CustomImageLoader *tempCIL = new CustomImageLoader(vItem.toMap(), this);
        _dataModel->insert(tempCIL);
    }
    

    In other words, the same list that was used in the previous version now is iterated and CustomImageLoaders are created, each contains data in the list.

    The result is a list with the exact number of items, but they are all empty.

    I have connected the properties of tempCIL and they do not contain the same channels from the original list.

    By filling the list with the custom class, in my code QML
    ListItemData.title now returns undefined instead of a string.

    If I print the ListItem ListItemData, it displays an instance of CustomImageLoader.

    I did C++ and QML code very similar to the example of Image Loader, and I can't see what is wrong.

    Advice and pointers are welcome.

    DERP DERP

    I'm not even good to copy

    I missed the Q_PROPERTYs in all

    class CustomImageLoader : public QObject
    {
        Q_OBJECT
    
        Q_PROPERTY(QVariant image READ image NOTIFY imageChanged)
        Q_PROPERTY(QString label READ label NOTIFY labelChanged)
    
        Q_PROPERTY(bool loading READ loading NOTIFY loadingChanged)
    
        Q_PROPERTY(QString desc READ desc)
        Q_PROPERTY(QString porder READ porder)
        Q_PROPERTY(QString target READ target)
        Q_PROPERTY(QString title READ titulo)
        ...
    

    4 hours of pain

  • To access the bindItems returns the undefined value

    Hello

    I'm trying to access the string representing the expression SOM associated with dynamic properties for a drop-down list by using script.

    Looking at the xml source I see the bindItems element with attributes in ref, labelRef and valueRef.

    I thought I'd try to access these values for a particular DropDown in the script editor would be:

    DropDown.bindItems.ref

    or something similar, but an exception is thrown that DropDown.bindItems is not defined.

    Any help would be greatly appreciated.

    Thank you.

    Kyle

    Hi Kyle,.

    I don't know what is the boss, some seem to work some don't. But you can work around it by using one of the following methods.

    . REF DropDown ["#bindItems"]

    DropDown.resolveNode('#bindItems').ref

    Good luck

    Bruce

  • Looking for an example of "function that returns the error text.

    Environment: APEX 3.1.1.00.09 on AIX 5.3

    I'm looking for an example implementation of the posting of the "function that returns the error text.

    I would like to write a database function that does the validation logic and return the text of the error.

    Is it possible to create multiple lines of text of error based on error conditions?

    I'm trying to use it at the end of the input data to go on the set of the 'document' to the entry and highlight all error conditions encountered before the 'document' is subject to additional processing.

    I wrote the function and reference it in a posting as ' validate_stuff (: P3_DOC_SEQ); »

    I have an error message "validate_stuff is not a procedure or is not defined.

    The object is a function, not a procedure. It is defined to return a parameter VARCHAR2 hoped posting if it is not NULL.

    When I run the SQL function * more and spend in a number of documents are returned the correct error messages.

    Any direction is greatly appreciated.

    -gary

    Hi Gary,.

    You must RETURN the result of the function:

    BEGIN
     RETURN validate_stuff(:P3_DOC_SEQ);
    END;
    

    Andy

  • File navigation dialog box always returns the application folder, not the one I selected

    My script uses a hardcoded destination path to save files. I want to make it more flexible with a file navigation dialog box.

    The function of file selectDlg seems obvious, but it always returns the location of the folder of Photoshop, not the folder I chose in the dialog box.

    For example:

    var outputFolder = Folder();

    outputFolder.selectDlg ("output :"); folder

    $.write (outputfolder);

    Expected:

    My JavaScript console must declare the file I selected in the system dialog box.

    Actual results:

    Regardless of the folder in which I select in the dialog box, it returns always like:

    /c/program%20Files/Adobe/Adobe%20Photoshop%20CC%202014/tmp00000001

    The directory path is where Photoshop is installed on my computer. The tmp00000001 file seems to come.

    Am I missing something obvious?

    var f = Folder();
    var outputFolder = f.selectDlg("Output folder:");
    $.write(outputFolder);
    
  • Mathmatical function to return the value in injectors

    Hello
    I have obliged. If value for ex Lake 4400000, he should return as 4.4millions even for billions.
    is there an oracle function to return the value in this format. ???

    Hello

    When I want to have a "readable" released in large numbers, I use to do the following:

    Scott@my11g SQL>with t as (
      2  select 3456123456 n from dual
      3  union all select 4567123 from dual
      4  union all select 123465 from dual
      5  )
      6  select n, case when n>1000000000 then trunc(n/1000000000,1)||' Billions'
      7  when n>1000000 then trunc(n/1000000,1)||' Millions'
      8  else to_char(n) end fmtn
      9  from t ;
    
             N FMTN
    ---------- -------------------------------------------------
    3456123456 3.4 Billions
       4567123 4.5 Millions
        123465 123465
    

    ------
    * + [change] + *.
    Moreover, lakh [url http://en.wikipedia.org/wiki/Lakh] has no meaning outside of South Asia.
    Especially for a French man like me, grown with [url http://en.wikipedia.org/wiki/International_System_of_Units] International system of units that is fighting against what I call "funky" measures empirical such miles, yards, feet, inches, just not multiple of 10³
    Same billion mean differ depending on the country (see [url http://en.wikipedia.org/wiki/Long_and_short_scales] long and short scales)

    Just for "fun": [url http://articles.cnn.com/1999-09-30/tech/9909_30_mars.metric.02_1_climate-orbiter-spacecraft-team-metric-system?_s=PM:TECH] this is what can happen when we do not use the same system of units.

  • Need help with the function MAX Returns the values

    I am creating a report to return slow movement inventory data. One of the requests is that it return only the last date that an item is traded on. A map shows the last date of receipt for a part, the other will show the last time, a part has been issued or shipped on a sales order.

    The hiccup is that it returns every single of the last time that an item has been received, so every last show of the material (on the second sheet) of items on-site.

    Could someone help me set the max value? As shown below, and many variations, the sheet comes up with no corrupt data or dates.

    MAX (Date of the MAX operation) (PARTITION OF matter Transactions.Item matter Transactions.Item ORDER)

    Always returns the next two when in reality, I want just the one with the date the most recent (April 2010).

    100034 BNDSCE-105 - QUALITY BEARINGS OR EQUIVALENT A400M AB01D...     Problem of component WIP $0.00 11-Sep-2009-3
    100034 BNDSCE-105 - QUALITY BEARINGS OR EQUIVALENT A400M AD01D...     Problem of component WIP $0.00 April 13, 2010-16

    Thank you for your help.

    Becka

    Hi Becka
    If you have a new calculated column showng, as in your example, 13 April 10, and you have another column that contains also this date, you should be able to create a new condition. Condition that must be the date calculated max is equal to the actual date, thus returning only the line that includes 13 April 10.

    I hope I'm makng sense

    Best wishes
    Michael

  • How to get the query of the region "PL/SQL function body returns the query string"?

    Hello

    is it possible to get the query string from the region of type "PL/SQL function body returns the query string"?

    I can get the definition of the region as a PL/SQL procedure, but I am interested in the returned query. I tried to write something like

    < pre > v_return_query: = «...» » ;
    : P49_QUERY: = v_return_query;
    Return v_return_query; < / pre >

    to save the return on hidden item P49_QUERY string, but it does not work. I get the error message: ERR-1002 cannot find the item for the "P49_QUERY" element ID in the application '4000 '.

    Kind regards
    Przemek

    If you need to make reference to a page element in the block then you can use this type of control to avoid having to use generic column names:

    if apex_application.get_current_flow_sgid(:APP_ID) = apex_application.get_sgid then-- runtime  :P9_SQL := vSQL;else-- design time  null;end if;
    

    But if all you want to do is capture the SQL debugging you can take all the references element in the block and use the insert statement (in a debug table) as I showed earlier.

    Scott

  • function to_numer returns the error in pl/sql

    Hello
    I don't have a prob when executing select double to_number('1234.56'), the numer contains decimal numbers
    But this stm return number not valid error in the procedure, except if I use to_number('1234.56','9999999.99')
    Please help me.
    I need to set parameter in DB?
    BTW: my NLS_NUMERIC_CHARACTER has the value '.,'
    Thank you.

    function to_numer returns the error in pl/sql

    hlthanh wrote:
    Hello
    I don't have a prob when executing select double to_number('1234.56'), the numer contains decimal numbers
    But this stm return number not valid error in the procedure, except if I use to_number('1234.56','9999999.99')
    Please help me.
    I need to set parameter in DB?
    BTW: my NLS_NUMERIC_CHARACTER has the value '.,'
    Thank you.

    Handle: hlthanh
    Status level: Beginner
    Join date: March 7, 1999
    Messages total: 94
    Total Questions: 60 (38 pending)
    many questions and so few answers.
    How SAD!

  • When I download a PDF in iBooks app Apple´s always displays the first page of the pdf.

    When I download a PDF in iBooks app Apple´s always displays the first page of the pdf. So, how can I change this first page to another page in the pdf file? We want to download a PDF file in the iBooks app. iBooks still displays the first page of the pdf, but the fist of our pdf page is always the same (black color). And we want to differentiate each other pdfs.

    There is no standard to do this, in particular no standard method to store in a PDF file, a preview map. Is iBooks entirely to Apple, but as most of the software that he will probably use the first page without condition.

    If iBooks can show something different (and it does its not useful), you will get this information to Apple.

  • Function that return the name of the current report

    Hello

    Anyone know if there is a function that returns the name of the current report?, similar to GET_APPLICATION_PROPERTY (CURRENT_FORM) in the forms.


    Tnks,


    LEFM

    Hello

    You can use the builtin: SRW. GET_REPORT_NAME
    This function returns the file name of the running report

    http://www.Oracle.com/webapps/online-help/reports/10.1.2/topics/htmlhelp_rwbuild_hs/rwrefex/PLSQL/builtins/SRW/srw_get_report_name.htm

    NOTE: it is not the name of the RDF file. Is the name defined in the reporting name property.

    Concerning

  • Count (1) returns the null value in the Group of

    Hi the gems... Good afternoon...

    I read that the COUNT() function always returns 0 (zero) if there is no corresponding row in the table.

    The following code returns 0 as expected:
    SELECT COUNT(1) FROM book_table
                 WHERE client_id = 10009
                   AND book_id = 5465465
                   AND book_sub_id = 'gfdf'
                   AND amount = 78686
    But when I used the GROUP BY clause in the query, then he returned to nothing:
    SELECT COUNT(1) FROM book_table
                 WHERE client_id = 10009
                   AND book_id = 5465465
                   AND book_sub_id = 'gfdf'
                   AND amount = 78686
    group by client_id,book_id,book_sub_id,amount
    Why this is happening... Please suggest...

    When you use just rely on its own (and you must use count (*) not count (1) as the optimizer based on CSSTidy will re - write internally to count (*) anyway)... then you say you want a count of all rows.

    When you introduce the group by clause you say thay want returned a number of records within specific groups... but if there are no groups, he cannot give you a line for any group with its county equivalent, because there are no lines for the groups. With the grouping, you have must have at least 1 row per group to get an account for her.

  • Returns the lowest value of two fields

    Hello

    I have two domains that users manually enter in a form.  Value1 and Value2.

    Someone at - it suggestions on the best way to use JavaScript to return the lowest value of the two fields?

    Thank you

    Natalie

    I think I misunderstood what you mean by any, I thought you wanted the calculated value to be None. The two fields value digital formats and modify the script for:

    Custom calculate script

    (function () {}

    Initialize the array

    aNums var = [];

    Get the field values as strings

    var s1 = getField("Value1").valueAsString;

    var S2 = getField("Value2").valueAsString;

    Convert values to numbers if not empty and add to the table

    If aNums.push(+s1) (s1);

    If aNums.push(+s2) (s2);

    Set the value of this lesser field of entries

    If both are blank, this field blank

    Event.Value = aNums.length? Math.min.Apply (null, aNums);:

    })();

Maybe you are looking for