Remove the Script level Document using JavaScript?

Hi all.

Is it possible for a document-level script to delete itself? I am running Adobe Acrobat Professional 11.

My situation is that I'm currently analysis data using a Java application. The taylors Java application a script based on each specific PDF and then inserts it into the PDF file automatically. When the PDF file is opened, the script runs once and then is no longer necessary.

Because the script is no longer required, it would be preferable if the script could be deleted automatically. Is it possible that the script has access to the field in which it is stored (for example, doc.javascriptField = "" ;)?) Or by some miracle, a remove function already exists?

I think that the lack of need for such function by General and advanced users I won't get it the answer I hope. But it's worth a shot. Meanwhile, I am inserting a flag in the field keyword so that the script does not run twice. It works, but it is not really clean.

Any help would be greatly appreciated.

Thank you

Jonny O

Use this code:

this.removeScript ("ScriptName");

Tags: Acrobat

Similar Questions

  • Satellite A500-1GL: it is advisable to remove the battery when you use the network

    I know this is a silly question but its actually something I know not so thought I would ask.

    I almost always plug my laptop into the supply line (satellite a500 1gl)
    I was wondering have you actually keep the battery installed even when using the electrical network.
    Or is it really advisable to remove the battery when you use the network?
    I didn't know if the battery should always be in place.
    Thanks for your help
    Torti

    Hello

    A few years ago it was recommended to remove the battery of the laptop if the AC adapter is plugged. What keeps the constant charge battery
    New age of batteries are better you can leave the battery in the Bay it s ok and it should not affect the performance

    However, sooner or later each battery would die it s only a matter of time, you know

  • Satellite A660-k17: can I remove the two primary partitions used for restoration?

    Hello
    I have 3 questions :) #.

    1. I burned a copy dvd recovery media, on a laptop A660 k17. There are two partitions on the disk that I think are there for the recovery. The first is 1.46 GB and it's for the recovery and another partition hidden 8.29 GB... and I think that the first contains the Recovery Wizard and the whole environment in which we will get through the repair of the system and the hidden disk contains the actuall with windows data, drivers and so on. Can I remove these two? I ask mainly on the first, if it is not necessary for the system to boot or something after that I have to recover the laptop to the factory setting.

    2 and I also want to leave my partitions so that I don't have to partition the whole drive from C 600 GB again. I have a D drive created but there is this response to a topic already in the forum http://forums.computers.toshiba-europe.com/forums/thread.jspa?threadID=64754&tstart=90
    who says that when I leave the partitions I created myself, that the recovery will be not available. I have a copy on dvd, but only to make sure no kidding something upward.

    3. when I want a clean system without some software which are preloaded on the oem recovery disk... I have to use windows recovery? or it will be the same as the toshiba one?
    Thanks for the reply possible :)
    Beautiful day :)

    > Can I remove the two primary partitions used for restoration?
    First not, but you can remove the Toshiba recovery partition if you created the recovery DVDs. One day, if you want to install the recovery image once again you can use created the recovery disc.

  • Is it possible to blackBerry smartphones can remove the BBM5.0 when using OS5.0?

    Is there a way to remove the BBM5.0 when using OS5.0? I tried using DM6.0 but BBM is marked as a component of basic impossible to remove.

    I hate BBM in general because it is always on. I don't want to install an older version.

    If anyone can help me, thanks in advance.

    lusilveira wrote:

    Is there a way to remove the BBM5.0 when using OS5.0? I tried using DM6.0 but BBM is marked as a component of basic impossible to remove.

    I hate BBM in general because it is always on. I don't want to install an older version.

    If anyone can help me, thanks in advance.

    • with a few OSes 5.0.X.X, BBm is a basic application and cannot be deleted.
    • BUT the other OSes, the BBm 5.0.X.X became an addon application and can be removed. (i.e. 5.0.0.43 6 and 5.0.0.462)

    If you have the first category OS, I suggest you try and install BBm for example using AppWorld. Perhaps by upgrading BBm, it will become an add-on.

  • How to remove the variable created when using definedNamedWhereClauseParam()

    Hello

    My Jdev version 11.1.1.7.0.

    I'm Executive where clause programatically where I need to bind two bind parameters under certain conditions. Example, I have two bind variables X, Y.

    Here's the problem:

    Assume that the first time I'm setting one variable X, so I define X bind variable and execute the query.

    What second time I send only Y but not X. In this implementation of the scenario of VO throw an exception, given that the variable X is already created in the VO object and where clause does not have this setting.

    So how to remove variables created in the original Version all in definedNamedWhereClauseParam(). I need to erase what ever the previously created variable every time I execute method.

    I can make the similar functionlity using setWhereClauseParam (using literals). But I have a few technical restrictions for use.

    Could you please help me how to remove the variable before vo using definedNamedWhereClauseParam.

    Caused by: java.sql.SQLException: try to set a parameter name that does not intervene in the SQL: itemNumber
    at oracle.jdbc.driver.OraclePreparedStatement.setObjectAtName(OraclePreparedStatement.java:15969)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObjectAtName(OraclePreparedStatementWrapper.java:911)
    at weblogic.jdbc.wrapper.PreparedStatement_oracle_jdbc_driver_OraclePreparedStatementWrapper.setObjectAtName (unknown Source)
    at oracle.jbo.server.OracleSQLBuilderImpl.bindParamValue(OracleSQLBuilderImpl.java:4669)
    at oracle.jbo.server.BaseSQLBuilderImpl.bindParametersForStmt(BaseSQLBuilderImpl.java:3687)
    at oracle.jbo.server.ViewObjectImpl.bindParametersForCollection(ViewObjectImpl.java:22742)
    at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:1298)
    ... more than 96



    Thank you.

    -Diette.

    Published by: Vidya Diette on February 28, 2013 08:43

    Hello

    You need access to the variable Manager. Order of reading in the JavaDocs:

    http://docs.Oracle.com/CD/E28389_01/apirefs.1111/e10653/Oracle/JBO/ViewObject.html--> http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10653/oracle/jbo/VariableManagerOwnerBase.html#getVariableManager%28%29--> http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10653/oracle/jbo/VariableValueManager.html--> http://docs.oracle.com/cd/E28389_01/apirefs.1111/e10653/oracle/jbo/VariableManager.html#removeVariable%28java.lang.String%29

    Frank

  • CS3 - is to remove the colors are not used in documents in a book

    Hello, I have a big problem...

    I have a book composed of about 120 documents Indesign InDesign.

    My question: did you know that a script that can delete the unused nuances in all the documents making up a book rather than document by document (120 documents) by the color chart menu.

    Thank you

    Not a requirement that I met earlier, but it seems too hard.

    for (var i = 0; i)
    {
    var currentDoc = app.open (app.books [0] .bookContents [i] .fullName, true);
    for (var j = currentDoc.unusedSwatches.length; j > 0; j-)
    currentDoc.unusedSwatches [j - 1] .remove ();
    currentDoc.close (SaveOptions.YES);

    }

    This script assumes that you have your one (and only one!) Book to the screen. It opens all documents in a book, removes the nuances and it closes.

    There has always been disagreements about what makes a "unused" shade, and I guess that it works the same as it does in the UI - it removes what is possible and leave the rest.

  • To adapt to the screen orientation by using javascript (for playbook)

    Hi all

    I know that the subject of the screen orientation has been crossed many times already, but I've searched and searched in the webworks put on an answer and can't find it.

    My application is made for the landscape. I have 2 options. ((1) lock app in landscape which I think still can be done using webworks (but please correct me if I'm worng) or 2) to scale the app for the portrait.

    Because to my knowledge 1) cannot be done, I'll focus on 2). Has anyone seen or written a javascript/css script that checks if the user holds the tablet in landscape or portrait and adapt to the 2 on-the-fly switching of b/w? My app is made for 1024 x 600. I know it can evolve using CSS 0.6 starting to adapt to the screen, but I don't know how to check and then re - evolve afterwards with javascript.

    Any help, please and thank you.

    In fact, you can lock in landscape orientation with

    your config.Xml file. Just remove the space after "rim:" because I added it to prevent the Bulletin Board to return as , haha.

  • Cannot set attribute of the param element value using javascript in setAttribute

    When adding the items param via createFragment the javascript in setAttribute function does not set the "value" attribute It is necessary to set the nodetext to add this attribute to the value of the param element.

    Second, when using the method of the generated html code defines the 'value' to the innerHTML. HTML code resulting in the display by "Inspect the system" looks like this.

    < parameter id = "myID" > myValue < / param >

    Note: [the element close text < / param > is displayed correctly using inspect, but when using file-> SavePageAs the end text is not saved correctly.] I reported this in another question of moz. support FF.]

    function setparamAttrs (parmID, parmVal)
    {

    var gData = document.createDocumentFragment();
    
     var newNode = document.createElement("param");
     var textStr = document.createTextNode(parmVal);
     newNode.appendChild(textStr);
    
     newNode.setAttribute("id", parmID);
     //newNode.setAttribute("value", parmVal);  // this does not work
     //newNode.setAttribute("innerHTML", parmVal);  //this does not work
    
     gData.appendChild(newNode);
     document.body.appendChild(gData);
    

    }

    However, I was able to retrieve the "value", once it has been added using:

    var val = document.getElementById("parm0").value;)

    getAttribute ("value") does not work either.

    Finally, I added the param elements to my HTML code like this.
    < parameter id = "myID" > myValue < / param >. Then I tried to extract the value using document.getElementById("myID").innerHTML. No text has been returned. When I looked at the HTML document with inspect my HTML param element is displayed as < param id = "myID" > myVal. The closing text of the element has not the same when I use SavePageAs which I mentioned previously.

    Yes, this is the correct way to this code and it works for me without any problem.

  • How to find the function to remove the ink level

    Can someone please tell me how to find the function "for the removal of the ink level window" I need know when I use no to factory ink cartridges. I have Windows XP, but this is probably not important.

    Hi Laura,

    Find things such as ink levels is a function of the printer driver.

    This is provided by the manufacturer of the printer, and they are the best resource on the operation of their particular drivers.  Therefore, it is best to ask the manufacturer of the printer for advice on this issue.

    Sometimes, there is an icon in the taskbar that you can get this information.  Yet once, it is a function of the driver and the printer software.

    For reference:

    Check on a printer ink levels

    http://Windows.Microsoft.com/en-us/Windows-Vista/check-ink-levels-on-a-printer

    How can I check my ink or toner levels?

    http://Windows.Microsoft.com/en-us/Windows7/how-do-I-change-my-ink-or-toner-levels

  • Place an SVG in a document using Javascript (Extendscript) illustrator

    Hello

    I'm trying to place an svg in illustrator with extendscript. Here is basically what I do

    var doc = app.documents.add(); var p = doc.placedItems.add(); p.file = new File(svgfilepath); 

    This operation fails with the error

    File is in a format that cannot be placed

    I am able to put the same file manually using file > Place. Am I missing something? Need help!

    [Link SO]

    Hi, try the following:

    // Reference: https://forums.adobe.com/thread/1722322
    //
    // Assumes you have an open Illustrator document
    // and an SVG file on your desktop named: testSVG.svg
    //
    // Basic Example:
    // Tested and worked in Illustrator CS5 / OS X
    //
    var doc = app.activeDocument;
    var svgFile = File(Folder.desktop + '/testSVG.svg');
    doc.groupItems.createFromFile(svgFile);
    

    Jongware say hello 'SO', and that it was right on the team of JS Illustrator. ;-) Also for later use, we have an Illustrator Scripting forum here.

  • Problems to remove the script tags.

    I do not use the browser to run Adobe Story, but the desktop version of my iMac.  Command-Double-click works, but once all the 30 times.  Does anyone else have this problem remove labels from a script?

    There are other ways to remove the tags in a script

    The Panel marking:

    -Open the sequencer Panel in view Menu

    -Click the button change. Here you have the possibility to delete a tag-individual items or to remove anything from the scene.

    On the file menu

    -Open the file - menu marking

    Here you will find the options to remove tags added all/manually/automatically added.

  • Remove the child window Parent using WIN API

    Hi all

    For a parent-child relationship between two screws using the User32.dll I use the SetParent function and pass the handle of the parent VI and VI child to this function. Now, after this relationship has been established, I want to remove the child from the parent window and use it as an independent VI using WIN API. Can someone help me on this?

    Thanks in advance!

    Fragger Fox!

    Hi Fragger Fox,

    I think that it should be possible, if you assign a new parent to the child. Maybe this works if you assign the desktop as a new parent.

    It will be useful.

    Mike

  • management of the script errors when using the step of the call placed

    I have a script which is activated by a trigger of jtapi. At some point places the caller on hold, makes a call using step Place call, plays a prompt and then terminates the call.

    If the trigger (first contact) hangs up when the phone for the second contact rings, when the second contact answers the phone plays the default script or "Sorry we currently live the problems of the system."

    Here's what I did (without success) to try to get around it: changed the default script for the application (do not know why it does not work.) This logic is invoked in a subflow, maybe that's the problem?), placed a Terminate step for the second contact in case of square step call, put in a bunch of steps On Error Goto who attend a stage finish to the second contact.

    Brandon, until the original caller is replaced, an 'exception' will be thrown.

    To make up for it, to the step "On Exception GoTo" > choose the ContactInactiveException > choose the label you want the call to go into the script > clears the exception (on no exception) and then play your .wav file (sorry, the band hung up.. blah, blah) > and then terminate.

    who should git'r done.

    Pleae rate useful positions.

  • How can I remove the microsoft account and use the address as one alias on another?

    So I have two microsoft accounts using gmail addresses, the first is the one who has all my data (throughout the onedrive, Skype, xbox, windows, etc.) and the second has nothing. I want to do is delete the second so that I can use the address as primary on the first alias (as is my most used gmail account). Is this possible?

    account 1: * e-mail address is removed from the privacy *.

    account 2: * e-mail address is removed from the privacy *.

    Hi Dan,.

    Thanks for posting in the Microsoft Community.

    From the description, it seems that you want to remove one of the two Microsoft accounts.

    Once you remove the secondary account from Microsoft, you can use the primary address, but you can go as an alias. 

    To remove a Microsoft account, you can see the Microsoft article and check if that helps:

    http://Windows.Microsoft.com/en-us/Windows-8/remove-account

    Note: Before deleting an account Microsoft make a backup of data.

    You can also consult the Microsoft account and check if it helps:

    http://Windows.Microsoft.com/en-us/Windows-Live/account-close-account

    To remove the Gmail account, you can green light, making the Gmail Web site.

    Just reply to the State of the question.

    Thank you.

  • Delete in af:table always remove the first line when using ExecuteWithParams

    Hello world

    I got a page with master form and af:table two details related to the master. When I'm trying to remove a line in an af:table of detail, it always removes the first line, any line, I selected before. The table has a single = rowSelection and the line is properly visually selected. I remove the line using a "delete hyperlink" on each line, but I first have to select the line. Delete called a bond (or a method at the bean by removing the current line of the iterator, I tried both, none of them work)

    Links page has an ExecuteWithParams defining the correct ID to edit on the master of iterator and an InvokeExecuteWithParams the renderModel value. If I put the refresh condition zero and I hard-code an ID in the binding variable in the model, I am able to delete the selected line.

    In addition, I don't know if this information is useful, but if I set the iterator to PPR ChangeEventPolicy, when I select a line, there always select the first line.

    Any ideas what I could do wrong? Is this a bug?

    I use JDev 11.1.1.7

    Thank you

    Guillaume

    You can try creating a method in ApplicationModule for filter master records instead of executeWithParams?

    Ashish

Maybe you are looking for