Using app.openDoc with LC field as path

Using LC ES2, Acrobat X.
I was hoping someone might be able to point me in the right direction.  Synopsis:  I have a LC form that I use to import parent/child XML data. This form is a report, but it is basically a summary of a group of PDFs that I send off to my clients (on CD).  Each child record has a field containing the name of its corresponding PDF file.  I have been trying my best to make a link that will open the child file in a new Acrobat window.  I've used app.openDoc, but cannot seem to pass my field into the cPath. I've even tried using the "address" of the field containing the path. Example:
app.openDoc({cPath:TextField1.rawvalue,oDoc: this});
I've tried the device independent paths as well as just "filename.pdf", where both source and targets were in the same folder.
I thought one of my attempts was going to work, but I got the "NotAllowedError: Security settings prevent access to this property or method." message in the debugger.
This brings me to disclosed=true.  Is is still the case that all of the target PDFs that I am linking to need to have this property set?  Or, am I missing something alltogether here?

Sorry, I marked it as bold text but unfortunately it happens to be unformatted
It's the app.openDoc within my function checlIfFileExists:
try {
        if( n == 0) {
           var checkDoc = app.openDoc({cPath :  "../GAG-out/"+filename+"-001.pdf"});
        } else  { 
           var checkDoc = app.openDoc({cPath :  "../GAG-out/"+filename+"-001_"+n+".pdf"});
         checkDoc.closeDoc();
        existingDoc = true;
     } catch (e) {  
         app.alert("Processing  error: "+e)

Similar Messages

  • Problem with checking file existence by using app.openDoc

    Hi Folks,
    I have to create a script for a big project with many PDF's. (Just like Ingrimm - it's the same company http://forums.adobe.com/thread/747022?tstart=0) This PDF's are made of scanned images. I need to rename the files to names that are extracted from within the file. This is working without problems.
    Now there could be the case, that a filename exists already. I don't want the files to be overwritten, so the idea is, that already existing filenames are saved as filename_1, filename_2, etc... (Before I merged them, but this isn't what is wanted.)
    For this reason I need to use app.openDoc to check, if a file exists. Yesterday my script worked fine, but after starting it today, I discovered that it started again to overwrite files which are already existing.
    I added an app.alert to my catch method to see what error is thrown. The message is: 'NotAllowedError: Security settings prevent access to this property or method.'.
    After using google, I found out, that Acrobat is not finding any files. But I checked and there are files which should be doubled.
    I have no idea how to fix that problem. Anybody here who can help me?
    Regards,
    Steffi
    * regular expression for search
    var idNumber = /08\d\d\d\d\-\d\d\d\-\d\d\d\d\d-\d\d\d/g;
    * if possible this function extracts the searched number as string
    * @param rematch string which should be searched in document
    * @return null if rematch is not found or string if rematch is found
    function ExtractFromDocument(reMatch) {
      try {
             var Out = new Object();
             for (var i = 0; i < 1; i++)
              numWords = this.getPageNumWords(i);
              var PageText = "";
              for (var j = 0; j < 30;j++) {
                  var word = this.getPageNthWord(i,j,false);
                  PageText += word;
              var strMatches = PageText.match(reMatch);
              if (strMatches == null) continue;
          return strMatches;
      } catch(e)
          app.alert("Processing error: "+e)
    * tries to load given filename (extracted number)
    * @param filename string of file which should be checked
    * @param n number to iterate while checking for files
    * @return true if file exists or false if not
    function checkIfFileExists(filename, n) {
        var existingDoc = false;
        try {
            if( n == 0) {
                var checkDoc = app.openDoc({cPath : "../GAG-out/"+filename+"-001.pdf"});
            } else { 
                var checkDoc = app.openDoc({cPath : "../GAG-out/"+filename+"-001_"+n+".pdf"});
            checkDoc.closeDoc();
            existingDoc = true;
        } catch (e) {  
             app.alert("Processing error: "+e)
        if( existingDoc == true ) {
            n = n+1;
            n = checkIfFileExists(filename, n);
        return n;
    var filename = ExtractFromDocument(idNumber);
    if(filename == null || filename == undefined) {
      filename = Math.round(Math.random()*999999999999);
      this.extractPages({nEnd:(this.numPages-1), cPath : "../GAG-out/n_"+filename+".pdf"});
    } else {
        fileExistence = checkIfFileExists(filename, 0);
        if(fileExistence != 0) {
            this.extractPages({nEnd:(this.numPages-1), cPath : "../GAG-out/"+filename+"-001_"+fileExistence+".pdf"}); 
        } else {
            this.extractPages({nEnd:(this.numPages-1), cPath : "../GAG-out/"+filename+"-001.pdf"});

    Sorry, I marked it as bold text but unfortunately it happens to be unformatted
    It's the app.openDoc within my function checlIfFileExists:
    try {
            if( n == 0) {
               var checkDoc = app.openDoc({cPath :  "../GAG-out/"+filename+"-001.pdf"});
            } else  { 
               var checkDoc = app.openDoc({cPath :  "../GAG-out/"+filename+"-001_"+n+".pdf"});
             checkDoc.closeDoc();
            existingDoc = true;
         } catch (e) {  
             app.alert("Processing  error: "+e)

  • Problem using app.launchURL with Adobe Reader X

    Hello -
      Have an application that is going live in a couple of days.  In many of our fillable PDF forms we use:
    app.launchURL("http://www.yoursitehere.com", true);
    This worked fine until our company pushed out Adobe Reader X to all of our employees.  Now the above function does nothing.
    Is anyone experiencing similar?   When I say the function does nothing, you click on button that runs the above function, and no new window opens with specified URL.

    I am not quite sure what that means.  Can you please explain?
    This has worked on same client pc before with version 7 - 9.   Now doesn't work anymore since upgrade to Adobe Reader X.
    Note:  ALL other AcroScript functions work properly
    Really appreciate any assistance you have.
    Jeremy
    *** UPDATE *** - I just tested more.   The only thing that is NOT working is the second parameter of the launchURL.
    If I remove that parameter, or put FALSE, then the URL opens.  However, it opens in the same window which is not what we need.
    Putting TRUE in there produces no result.
    Message was edited by: jred33

  • Problem in using a structure with a field of  data type 'RAW STRING'

    Friends
    I have written a ZBAPI that imports a structure which has 5 fields. I have defined this in the IMPORT tab of Tr.Code <SE37>.  One of the field of this structure is of data type 'RAW STRING'.
    When I try to activate this BAPI, I get an error message as follows:
    Function Module ZBAPI_ADD_CONFIG_DNA
    "ZDAMPER_CON_DNA" Must be a flat structure. You cannot use internal table
    strings, references, or structures as components.
    Where ZDAMPER_CON_DNA is the table name that I am using.
    FOR TESTING PURPOSE, WHEN I CHANGE THE DATA TYPE FROM 'RAW STRING' TO JUST A CHAR OF LENGHT 5, IT WORKS FINE.
    Here is the source code of the simple BAPI that i am trying to activate.
    FUNCTION ZBAPI_ADD_CONFIG_DNA.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(CONFIG_DNA_DATA) TYPE  ZCONFIG_DNA_STRUCTURE
    *"  EXPORTING
    *"     VALUE(MESSAGE) TYPE  ZRETURNMESSAGE
    tables: ZDAMPER_CON_DNA.
        ZDAMPER_CON_DNA-CONFIG_ID       =     CONFIG_DNA_DATA-CONFIG_ID.
        ZDAMPER_CON_DNA-STRING_NAME     =     CONFIG_DNA_DATA-STRING_NAME.
        ZDAMPER_CON_DNA-STRING_FORMAT   =     CONFIG_DNA_DATA-STRING_FORMAT.
        ZDAMPER_CON_DNA-STRING_VALUE    =     CONFIG_DNA_DATA-STRING_VALUE.
        ZDAMPER_CON_DNA-OBJECT_NAME     =     CONFIG_DNA_DATA-OBJECT_NAME.
        INSERT ZDAMPER_CON_DNA.
        MESSAGE-SUBRC = sy-subrc.
        if sy-subrc = 0.
            MESSAGE-RETURNMESSAGE = 'SuccessfullyInserted'.
        else.
            MESSAGE-RETURNMESSAGE = 'Insert Failed'.
        endif.
    =============
    ANY KIND OF FEED BACK WILL BE HIGHLY APPRECIATED.
    THANKS
    RAM

    Hi ram,
    there is no data element exists with the name RAW STRING ,
    but check one of these names..
    Data element                   Short text
    C2S_RAWSTRING                  C2-Server: Data Element of Type Rawstring
    N2_RAWSTRING                   Byte String of Variable Length
    QISRDRAW_STRING                Data in Format RAW Character String
    RCF_RAWSTRING                  Rawstring
    RPAP_TEMPLATE_RAWSTRING        Blob of Template File
    RSRAWSTRING                    Raw String
    RSRD_RAWSTRING                 Binary Content in the Broadcasting Framework
    SWH_RAWSTRING                  Workflow: Data Type RAWSTRING
    WDR_RAWSTRING                  Byte Sequence of Variable Length
    <REMOVED BY MODERATOR>
    venkat.
    Edited by: Alvaro Tejada Galindo on Mar 7, 2008 5:15 PM

  • Using Oracle Text with CLOB field containing multiple languages

    I'm using Oracle 10g (NLS_CHARACTERSET is set to. AL32UTF8) and have a table with a CLOB field which is storing text written in either English and/or Simplified Chinese.
    The following index has been created on this field:
    CREATE INDEX text_index
    ON text_table(text_field)
    INDEXTYPE IS CTXSYS.CONTEXT
    PARAMETERS('FILTER CTXSYS.INSO_FILTER');
    I'm having issues in returning text which matches the Chinese text using the CONTAINS operator. For some reason the following query is returning rows which do not contain any Chinese text:
    SELECT *
    FROM text_table
    WHERE contains(text_field,'炫%') > 1;
    A newsgroup user advised me to produce an explain plan using ctx_query.explain.
    I created 2 explain plans, one which was searching the index for 'A%' and the other searching for the Simplified Chinese character '炫%'. The results for the first test were as expected whereby the values contained within the OBJECT_NAME field all began with the letter 'A'.
    The second test however produced somewhat unexpected results. The OBJECT_NAME field this time contained various words, both English and Simplified Chinese. I could be wrong but it appeared to store every individual word in the CLOB field. Both tests produced different EQUIVALENCE rows, the first test was:
    OPTIONS = Null
    OBJECT_NAME = A%
    Whereas the second test produced:
    OPTIONS = (?)
    OBJECT_NAME = %
    Am I right in thinking the Simplified Chinese character is for some reason being converted to a '?' character?
    Any help on this will be much appreciated.

    As you're not specifying a lexer to use, it will use the BASIC_LEXER, designed for space-separated European-type languages. This won't work effectively with Chinese.
    If you know which documents are Chinese and which are English, you can write this into a LANGUAGE column and use the MULTI_LEXER - this will allow you to specify BASIC_LEXER for the English texts, and CHINESE_LEXER or CHINESE_VGRAM_LEXER for the Chinese texts.
    If you don't know the language, you must use either WORLD_LEXER (10g) or AUTO_LEXER (11g). These lexers will automatically determine the language of the documents and index them appropriately. In general. MULTI_LEXER will be faster and more accurate than either of the automatic alternatives.
    When querying for Chinese characters you need to be very careful with your NLS_LANG settings. You need to make sure that the character set defined in NLS_LANG is the same as the character set from which you've pasted (or typed) the chinese characters.
    The "?" in output usually just means "I don't know how to translate this character into your output character set". Sometimes it may appear as a reversed question mark.

  • Structure used in BAPI with prdefined field

    Hi All,
    Is it ok to use predefined field in a structure used in BAPI? Will there be any limitation? Any advantage if we use data elements and domains.
    Regards,
    Seema

    Hi,
    Using predefined fileds in a structure should not be a problem. The only think you should consider is if there is a possibility that the component owner to which this structure belongs may change this structure. So if you are sure that there will be no such risk, then go ahead.
    Domains cannot be directly used within a program/FM/BAPI. Domains can only be associated with Data elements that can be used in BAPI. It is always safe to use DATA ELEMENTS as generally changes to them are avoided as they have huge dependencies.
    I hope this clarifies your query.
    Best Regards,
    Saurabh

  • Generic delta   using function module with two fields  AEDAT AND ERDAT

    Hi,
        i have scenario that i have to create a generic data source  having delta using funcation module and the delta speci fields are AEDAT AND ERDAT . Is there possibility with out using these two fields ( i mean AEDAT AND ERDAT)  in the extract structure can i create the data source . and provide sample code for me . it is very urgent.
    waiting for the reply,
    sri.c

    Hi Sri,
    here some coding, I hope this helps!
    first, get the delta-field
          LOOP AT s_s_if-t_select INTO l_s_select.
            CASE l_s_select-fieldnm.
              WHEN 'ZDATE'.
                MOVE-CORRESPONDING l_s_select TO r_date.
                IF r_date-high IS INITIAL OR r_date-high = space.
                  r_date-high = '9991231'.
                ENDIF.
                APPEND r_date.
            ENDCASE.
          ENDLOOP.
    Cursor öffnen
          OPEN CURSOR WITH HOLD s_cursor FOR
          SELECT * FROM
          WHERE  ....
          AND    erdat in r_date
          AND    aedat IN r_date.
          FETCH NEXT CURSOR s_cursor INTO CORRESPONDING FIELDS OF table e_t_data package size s_s_if-maxsize.
    regards
    Siggi
    PS: Note that this coding only works for a very straight forward extraction.
    Message was edited by: Siegfried Szameitat

  • Using ME21N/ME22N with own Fields from MARA

    Hallo,
    i need help to insert some fields from MARA in
    the Tcode ME21/2N. For example MARA-GROES or MARA-ZEINR
    in the Item-List.
    Can i use the exit MM06E005, and has anybody a
    Codeexample?
    Thanks for help
    Dieter
    We have a new Problem. We have to store the new Fields
    in the EKPO. I use EXIT_SAPMM06E_013 with xekpo-ZZEINR
    but it doesn't work correct.
    Has anyone an idea?
    Thanks
    Regards Dieter
    Message was edited by: Dieter Gröhn

    Hi Dieter,
    1. Insert new field ZZ_ZEINR with component type<b> DZEINR</b> in structure CI_EKPODB via SE11. Save and activated once done.
    2. Go to <b>SE51</b> (Screen Painter), enter program <b>SAPLXM06</b> and screen number <b>0111</b> and click on change and select maintain in original language.
    3. Click on <b>Layout</b> button and create text field and input/output field for EKPO_CI-ZZ_ZEINR. Save and activated.
    4. Go to SE37 and enter function module <b> EXIT_SAPMM06E_016</b> and click on include <b>ZXM06U41</b>. In here you can code something like this. Save and activated once done.
    CLEAR: EKPO_CI-ZZ_ZEINR.
    SELECT SINGLE *
    FROM MARA
    WHERE MATNR = I_EKPO-MATNR.
    IF SY-SUBRC = 0.
      EKPO_CI-ZZ_ZEINR = MARA-ZEINR.
    ENDIF.
    Hope this will help.
    Regards,
    Ferry Lianto

  • Problem using BAPI BAPI_ACC_DOCUMENT_POST with vendor field XZEMP

    Hi, I'm using the bapi BAPI_ACC_DOCUMENT_POST, when i fill the table ACCOUNTPAYABLE and execute it, if i use a vendor that doesn't have an 'X' in the field XZEMP (Indicator: Alternative payee in document allowed ?) of the table LFA1 the bapi returns an error.
    I haven't found any place in the bapi tables to override this.
    Is there something that should be parameterized so that this error doesn't happen?
    Thanks!

    Hi,
    Refer
    https://wiki.sdn.sap.com/wiki/display/Snippets/VendorInvoicePostingusingBAPI
    Re: BAPI_ACC_DOCUMENT_POST

  • Using Group BY with text fields

    Hi,
    Is there any way around the problem of not being able to
    GROUP BY a text field???
    I have tried using the CAST (name AS VARCHAR(8000)) but it
    doesn't return the full value of the field...... I am getting about
    250 characters returned....
    Is there any way around this? ,

    I am assuming MS SQL Server. According to SQL Server Books
    Online:
    Note: Columns of type text, ntext, and image cannot be used in
    group_by_expression.
    For GROUP BY clauses that do not contain CUBE or ROLLUP, the
    number of group_by_expression items is limited by the GROUP BY
    column sizes, the aggregated columns, and the aggregate values
    involved in the query. This limit originates from the limit of
    8,060 bytes on the intermediate work table that is needed to
    hold intermediate query results. A maximum of 10 grouping
    expressions is permitted when CUBE or ROLLUP is specified.
    Phil

  • How to use MAX() function with date field

    Hi Frzz,
    I have created a Graphical calculation view in which i have multiple records for each employee with different dates. But my requirement is to take the records which have maximum date.
    I have converted the date into Integer and applied the MAX() function. But still am getting multiple records.
    Is there is any other way we can achieve this requirement in Graphical Calculation view??  Your suggestion will really help me.
    Thank  you.
    Krishna.

    Hmm... what have you tried out so far?
    Look, I took the effort and created a little example, just for you
    Assume we have a table that contains the logon dates of users.
    Every line contains the logon date and some info on the user.
    Very much like a not-normalized log file could look like.
    Now, the output we want is: one line per user with the most current logon time.
    Not too difficult:
    1. Have a aggregation node that gives you the distinct user details - one line for every user:
    2. Have another aggregation node that gives you the last (MAX) logon date per user:
    Finally you do a 1:1 join on the USER_ID and map the result to the output.
    Easy as pie
    - Lars

  • How to use logical operators with the fields, this feature is avaliable?

    Hi, I need in a form to compare the content of two fields, i.e.  email and confirmation email, is this possible in Forms Central?, how I can do it?
    Thanks you

    Not Supported
    Hi,
    This is not something we currently support but you can add or vote on feature ideas:
    http://forums.adobe.com/community/formscentral?view=idea
    If you need to add a new idea click "Create an idea" under "Actions" in the top right.
    Thanks,
    Jeff

  • How do i use app store with out credit card

    HI i want to download app form app store but it's required credit card.

    Either you supply the correct credit card info or buy an iTunes gift card.

  • App.openDoc works in Acrobat, not in Reader

    In a folder-level script I'm using app.openDoc to open an existing PDF and extract an icon from it. The following code works in Acrobat 11 but in Reader X I get a NotAllowedError: Security settings prevent access to this property or method error.
    this.disclosed = true;
    myIcon = app.trustedFunction(function (oArgs) {
         app.beginPriv();
         var pluginPath = app.getPath({ cCategory: "app", cFolder: "javascript" });
         var myDoc = app.openDoc({ cPath: pluginPath + "/MyImages.pdf", bHidden: true });     // <----- error happens on this line
         var oIcon = util.iconStreamFromIcon(myDoc.getIcon("myIcon"));
         app.endPriv();
         return oIcon;
    The MyImages.pdf exists in the same Javascripts folder as the javascript file. I created MyImages.pdf manually via the console and set disclosed=true before saving it.
    I've also tried modifying the call to app.openDoc to set oDoc:this (as recommended in other discussions) but that only caused the same NotAllowedError in both Acrobat and Reader.
    Any ideas?

    It gets called from the top level of the javascript file. Here's an example -- the exact contents of my javascript file -- where I simply load the icon and display the width in a pop up alert. If I open a PDF from the file system then this generates the same NotAllowedError during the call to app.openDoc(). But, if I launch Reader and wait before opening the PDF, the code runs fine and the correct icon width gets alerted to me.
    var myIcon = app.trustedFunction(function () {
          app.beginPriv();
         var pluginPath = app.getPath({ cCategory: "app", cFolder: "javascript" });
         var myDoc = app.openDoc({ cPath: pluginPath + "/MyImages.pdf", bHidden: true });     // <----- error happens on this line
         var oIcon = util.iconStreamFromIcon(myDoc.getIcon("myIcon"));
          myDoc.closeDoc(true);
          app.endPriv();
         return oIcon;
    app.alert(myIcon.width);

  • IPad randomly crashing when using apps.

    Hello everyone,
    I have had a 3G 64Go iPad for almost two months by now, and it has never had any physical damage.
    The problem I am experiencing is that it keeps crashing randomly when I use apps, especially with "big" apps that require more from the system (it will not crash if I use iBooks or if I watch a film, but there are plenty of games that I cannot launch because they are in 3D).
    I restored the whole firmware, but it does not change anything.
    (The iPad even crashes very often when I sync it with the MacBook)
    I am beginning to wonder if there is not an internal hardware problem, because I really have no idea about where the problem comes from, and it is beginning to be a bit annoying to have an iPad that you can almost only use to check your mail or listen to music !
    I would like to know if anybody has had the same kind of issue and found a solution, and what I should do about this.
    Thank you very much for your help !

    Thank you for your answer Carolyn !
    I am going to restore the iPad according to your instructions, but I do not think that this is caused by an app in particular.
    I forgot to mention it in the first post, but this has happened from the day I got it; I synced it to my laptop, and since I was in an area with no wifi around by the time, I only put one app onto my iPad, it was the iPhone version of a game, that has crashed several times, just the way it does now with other apps.
    I was surprised but did not really worry back then. The app is no longer on the iPad (it's been on the iPad for a few days only) and even if it had been the one causing all the crashes, it has been removed and the device has been restored since, so I don't get how it could have kept the problem...
    I also forgot to say that, when my iPad crashes, there is a kind of "white stripe" across the screen for a fraction of second, then it reboots (and often crashes again as soon as it has finished rebooting); I even had a really weird screen once, which made me worry, with white lines of program written across the reboot screen (the black one with the apple logo in the middle), and I remember the last line said "Panic: we are hanging here..." !
    (I took a picture of the screen, if it helps...)
    I don't think I forgot anything more.
    I am going to try to restore it the way you told me anyway, and see if it helps, but I do not have much hope !
    Thank you very much for your answer though, I will feedback as soon as I am done restoring it, and I keep waiting for your advice in the meantime.

Maybe you are looking for

  • MB5B Report..!!1

    MB5B Stock showing Minus on Particular date ( issue is more than receipt) we are having the practice of posting consumption entry (201) post dated..whether system is  checking Current stock OR Stock on that date.

  • Apps and Music won't sync to iPod Touch, Not authenticated, but it is HELP!

    QuickTime 7.6.5 FairPlay 1.6.16 Apple Application Support 1.1.0 iPod Updater Library 9.0d11 CD Driver 2.2.0.1 CD Driver DLL 2.1.1.1 Apple Mobile Device 2.6.0.32 Apple Mobile Device Driver 1.45.0.0 Bonjour 1.0.6.2 (118.5) iTunes Serial Number 3891DB9D

  • LANGUAGE TRANSLATE USING SQL(urgent)

    Hi All is there any sql function that convert the english character data into other language as i have a table emp_info having a column name obviously all data stored in english and many reports use this as it is(in english) but now i want to display

  • Not seeing DNG edits in quicklook and coverflow

    I found another archived post about this that went unanswered a few years ago, so I'm asking again. Does anyone have any information on how to see edits to DNG files or edits from Adobe Camera Raw xml files in quicklook and coverflow? I'm trying to d

  • Anyone else having trouble with .Mac servers?

    I can get nothing at the moment from the iDisk with a browser; not even from the Sites folder with the old homepage url. One error message I receive is actually a 403: Even images used in previous posts here, hosted on the iDisk, are not rendering: h