Set preferences from Javascript

Can preferences be set from a folder-level or document-level Javascript in Acrobat Pro 7 and 8?
In particular, I am interested in toggling on "Display PDF in browser" and "Use local fonts".
Alternatively, can JS read these settings, so that a suitable warning can be displayed?
Thanks,
Bruce

Bruce,
  Were you able to address the issue here.. setPreference through JS (HTML).... our corporate policy is enforce opening PDF in new window but our application needs to open PDF in the same browser...... but the links need to open in new window.
Thanks for your response..
- K

Similar Messages

  • Set jsp from javascript

    I have three "div" tags in index.jsp ,
    <div id='header'></div>
    <div id='body'></div>
    <div id='footer'></div>
    Now when window is loaded i want other jsp page to be set in the "body" div tag of index.jsp from javascript
    My javascript code
    function invokeJSP(){
    document.getElementById('body').innerHTML="<jsp:include page='test.jsp'>'";
    when I am including this code in <head > part of index.jsp its working the problem is if at all
    In test.jsp
    if i try to include this line
    <% = request.getParameter("name")%>
    its giving an error like "unterminated literal string" in javascript console
    Can anyone help me how to set the jsp from javascript
    Sorry for my bad english.This is the first time I am posting the forum
    thanks
    hema

    hi
    Thanks for the response
    but i have closed the tag in my program. Have u ever tried to invoke jsp from javascript in this way if it works plz help me.
    thanks hema

  • Set Stroke Alignment from JavaScript

    Hi,
    I'm trying to set the stroke style for a path item I've drawn through JavaScript, however I can't find a way to set the stroke alignment for my path item.
    I've checked the Illustrator JavaScript reference but I can't seem to find that option in there.
    I would expect something like:
    pathItem.strokeAlignment = StrokeAlignment.OUTSIDE; // This doesn't work, what is the correct way to set the stroke alignment from JavaScript?
    If I change the option in the Actions Panel it comes up as 'Set Stroke/Alignment: Outside', so there must be an equivalent way of setting it from JavaScript.
    Is there a way of converting Actions to JavaScript so you can see which properties and attributes are being set on the object?
    Does anyone know the correct way to set the strok alignment from JavaScript?
    Thanks!

    You can only call an action from JavaScript in CS6… (I don't have this). Up until then it was AppleScript and Visual Basic only…
    Document raster effects you do have access to…
    Class
    RasterEffectOptions
    The document raster effects settings.
    Class
    Property
    Type
    Access
    Description
    antiAliasing
    bool
    r/w
    Should the resulting image be antialiased. (default: false)
    clippingMask
    bool
    r/w
    Should a clipping mask be created for the resulting image. (default: false)
    colorModel
    RasterizationColorModel:
    RasterizationColorModel.DEFAULTCOLORMODEL
    RasterizationColorModel.GRAYSCALE
    RasterizationColorModel.BITMAP
    r/w
    The color model for the rasterization. (default: RasterizationColorModel.DEFAULTCOLORMODEL)
    convertSpotColors
    bool
    r/w
    Whether to convert all spot colors to process colors in the resulting image. (default: false)
    padding
    number
    r/w
    The amount of white space (in points) to be added around the object during rasterization. (default: 0)
    resolution
    number (range: 72.0 - 2400.0)
    r/w
    The rasterization resolution in dots-per-inch (dpi) (default: 300)
    transparency
    bool
    r/w
    Should the resulting image use transparency. (default: false)

  • Newbie qs. how to find duration or set position (in time) of a flash movie from Javascript?

    I am trying to control the Flash player browser plugin from
    Javascript.
    - I need to set the start position to play, based on time.
    example, setPosition(10 seconds)
    However I notice that the flash player API is based upon
    number of frames.
    for example, the methods TotalFrames() and GotoFrame() are
    based on frame number.
    How do I convert it to time? I don't see a frame rate
    variable.
    I don't see a call to access this - but the duration of a
    clip is always shown near the slider
    - can I also query the duration from the player?
    - I also need a callback into my Javascript object when an
    event occurs - for example,
    when the player stops playing because it is stopped by the
    user. Should work on earlier versions than Flash 8.
    Any help appreciated.
    thanks,
    Anil

    no replies?

  • Keep getting a message from Javascript (not Java)- "Uninstall Set", help it will not go away

    Each time I use Firefox, the message "Uninstall Set" keep popping up from Javascript (not Java). I can not use Firefox because this keeps popping up.

    That would be from an extension, anything similar from Firefox would have been cleaned up. If you'd been on 4.0.1 for a while and it just started happening, then I'd try Tools > Add-ons > Extensions then on the gear wheel choose "View Recent Updates" the date will appear the list small and the. The "last updated" button near top right does something mysterious.
    To see list in normal fashion again choose "Appearances" then return to "Extensions".
    If you dislike the formatting of the Add-ons list during normal viewing you can improve it tremendously with a custom style:
    * [https://addons.mozilla.org/firefox/addon/stylish/ Stylish :: Add-ons for Firefox]
    * [http://userstyles.org/styles/42112/firefox-4-compact-addons-manager Firefox 4 - Compact Addons Manager - Themes and Skins for browser - userstyles.org]
    From the wording the message could possible be referring to a Collection of Extensions. I avoid collection sets like the plague.
    Also see related answer
    * [https://support.mozilla.com/en-US/questions/824098 i keep getting a pop up saying uninstall set | Firefox Support Forum | Firefox Help] by Cor-el.

  • Set application item from javascript?

    Hi!
    Is it possible to set an APPLICATION ITEM from javascript? If so can some one please point me to the thread, or a FAQ or an example, etc?
    Thanks!
    Dave Venus

    dvenus1,
    Sure. In the script below I check variables and populate based on what I find...
    <script language="JavaScript" type="text/javascript">
    function Populate_fld()
    var formVehicle = document.getElementById('P9_HIDE_VEHICLE').value;
    var formState = document.getElementById('P9_HIDE_STATE').value;
    var formTag = document.getElementById('P9_HIDE_TAG').value;
    var formName = document.getElementById('P9_HIDE_NAME').value;
    document.getElementById("P9_VEHICLE").value = formVehicle;
    document.getElementById("P9_TAG").value = formTag;
    document.getElementById("P9_STATE").value = formState;
    document.getElementById("P9_VISITOR_NAME").value = formName;
    if (formState = " ")
    document.getElementById("P9_STATE").value = "FL";
    </script>
    Keep Smiling,
    Bob R

  • Set OFF from the TM Preferences

    My TM is currently Set OFF from the TM Preferences. Still I can run Time Machine from the menu by giving 'back up now'.
    Is this a feature (OK with me but seems unlogical)

    I suppose it is just an override, that lets you back up while still keeping the setting for preventing it doing it hourly. Best of both worlds.

  • Please help: unable to set preferences for planning from workspace.

    Hi Experts,
    unable to set preferences for planning from workspace.(file--->preferences----->planning), when doing this task prompts " An Error occured" preferences works fine with other components IR, FR, WEB ANALYSIS.problem is only with the planning.
    1) i restarted the workspace and planning services but even then the same issue.
    Please help me out on this issue.
    Thanks.

    Hi,
    Do you get the same problem if you access planning directly ? http://<planningmachine>:8300/HyperionPlanning/
    Just trying to understand if it related directly to planning and maybe you will get a different error message.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Adding items to a selectOneListbox from Javascript

    In my JSF page I have...
    <h:form id="alternateDeviceSelectForm">
        <h:selectOneListbox id="selectBox"/>
        <h:commandButton id="okButton" value="#{i18n.ok}" action="#{aBean.anActionMethod}"/>
    </h:form>I also have this Javascript...
    for (var i=0; i < devices.length; i++) {
        var device = devices;
    // a String
    var id = device.getId();
    // another String
    var displayName = device.getDisplayName();
    this.selectBox.options[i] = new Option(displayName,id);
    This creates the listbox and when the Javascript method fires, the appropriate items are listed in as list items.  However, when I hit the OK button, I get a JSF message about a validation error.  I'm not using any custom validation at all.
    Here's the error message I get... "alternateDeviceSelectForm:selectBox: Validation Error: Value is not valid"
    Any ideas on how I can get this working?  (I have to get the listbox item values from Javascript because that is the interface to a browser plugin that is involved in this process.)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    dalearyous wrote:
    the only thing is there is no data to begin with. after you choose the data structure there is a text field to type in something like apple and then you click add. then you can type in something like pear and click add.If you do it right, the part that controls the data structures won't need to directly interact with the part that adds/removes the elements in the data structures -- they'll be independent units. That's what we call "orthogonal", and it helps make programs much easier to develop and maintain. To do that, you have a common set of add/remove operations across all data structures -- just like in the Collections framework, which you should use unless your teacher is telling you that you must make your own. (And even if you do, ask your teacher if you can use the interfaces from the Collections framework, if not the implementations.)
    The example I showed you supports that, in that it doesn't assume that the data structures initially contain any data. (Though it might be better to create empty Collections in your constructor, rather than ever letting existingCollection go null.

  • How to get a value from JavaScript

    How to get return value from Java Script and catch it in c++ code. I have tried following code, but its not working in my case.
    what I want is if it returns true then call some function if it returns false then do nothing, so how to get those values in c++
    ScriptData::ScriptDataType fDataType = resultData.GetType();
    if (fDataType == kTrue)
           CAlert::InformationAlert("sucess");
           //call some function
                        else
                                  CAlert::InformationAlert("Error");
         // do nothing
    JavaScript Code:
        if(app.scriptArgs.isDefined("paramkeyname1"))
               var value = app.scriptArgs.get("paramkeyname1");
               alert(value);
                return true;
      else
               alert ("SORRY");
               return false;

    How to get java script result into JSResult i m not getting it.
    I have wriiten follwing code in c++ :
              WideString scriptPath("\\InDesign\\Source1.jsx");
              IDFile scriptFile(scriptPath);
              InterfacePtr<IScriptRunner>scriptRunner(Utils<IScriptUtils>()->QueryScriptRunner(scriptFi le));
              if(scriptRunner)
                        ScriptRecordData arguments;
                        ScriptIDValuePair arg;
                        ScriptID aID;
                        ScriptData script(scriptFile);
                        ScriptData resultData;
                        PMString errorString;
                        KeyValuePair<ScriptID,ScriptData> ScriptIDValuePair(aID,script);
                        arguments.push_back(ScriptIDValuePair);
                        PMString paramkeyname1;
                        Utils<IScriptArgs>()->Save();
                        Utils<IScriptArgs>()->Set("paramkeyname1",scriptPath);
                        Utils<IScriptUtils>()->DispatchScriptRunner(scriptRunner,script,arguments,resultData,erro rString,kFalse);
                        Utils<IScriptArgs>()->Restore();
                        ScriptData::ScriptDataType fDataType = resultData.GetType(); // here i should get true or false which i m passing it from javascript code......not as s_boolean
                        if (fDataType == kTrue)
                                       //CAlert::InformationAlert("sucess");
                                     iOrigActionComponent->DoAction(ac, actionID, mousePoint, widget);
                        else
                                    this->PreProcess(PMString(kCstAFltAboutBoxStringKey));
    Java script code:
    function main()
           var scrpt_var;
           var scriptPath,scrptMsg;
           var frntDoc=app.documents[0];
           if(app.scriptArgs.isDefined("paramkeyname1"))
               var value = app.scriptArgs.get("paramkeyname1");
                alert(value);
                 return true; // i want this value i should get in c++ code...How to get these values in c++
           else
              alert ("Error");
              return false; // i want this value i should get in c++ code...How to get these values in c++

  • Calling a java static method from javascript

    I am running into issue while calling a java static method with a parameter from javascript. I am getting the following error. Any help is greatly appreciated.
    Thx
    An error occurred at line: 103 in the jsp file: /jnlpLaunch.jsp
    pfProjectId cannot be resolved to a variable
    =================================================
    // Java static method with one parameter
    <%!
    public static void CreateJnlpFile(String pfProjectId)
    %>
    //Script that calls java static method
    <script language="javascript" type="text/javascript">
    var pfProjectId = "proj1057";
    // Here I am calling java method
    <%CreateJnlpFile(pfProjectId);%>
    </script>
    ===================================================
    Edited by: 878645 on Mar 6, 2012 11:30 PM

    Thanks, Got what you are telling. Right now I have one jsp file which is setting the parameter 'pfProjectId' and in another .jsp I am retrieving it. But I am getting null valuue
    for the variable. I am wondering why I am getting null value in the second jsp page?.
    Thx
    ====================================================================
    <script language="javascript" type="text/javascript">
    // Setting parameter pfProjectId
    var pfProjectId = "proj1057";
    request.setParameter("pfProjectId", "pfProjectId");
    </script>
    // Using Button post to call a .jsp that creates jnlp file
    <form method=post action="CreateJnlpFile.jsp">
    <input type="submit" value="Create JNLP File">
    </form>
    //Contents of second .jsp file CreateJNLPFile.jsp
    String pfProjectId = request.getParameter("pfProjectId ");
    System.out.println( "In CreateJnlpFile.jsp pfProjectId " + pfProjectId );
    =======================================================

  • Passing complex object from JavaScript to Flex

    Is it possible to call a Flex function (defined with ExternalInterface.addCallback) and pass a complex object from Javascript?  The properties of the object are all simple types, but the object itself is an array of objects.  For example:
    <script type="text/javascript">
    var arrayOfObj = [ { one: "one", two: 2, three: "blah" }, { one: "xyz", two: "abc", three: 3.141 } ];
    callSomeFunctionInFlex(arrayOfObj);
    </script>
    What would I do on the Flex side to make this happen?

    Complex object passing works as expected in Blazeds. 
    There are certain cases where you need to write custom bean proxy classes to marshall an object, but your case is very simple and will not require it.
    Make sure that you set the full java package and class name in your remote alias statement on your client value object.  The class has to be fully qualified.  The AS value object also needs the correct import of the nested value object or you will get a compile error.
    Make sure that the blazeds server has the full class path set to your java objects.
    To debug, you can turn on Blazeds logging in the services-config.xml file like this:
       <logging>
            <!-- You may also use flex.messaging.log.ServletLogTarget -->
            <target class="flex.messaging.log.ConsoleTarget" level="DEBUG">
                <properties>
                    <prefix>[BlazeDS]</prefix>
                    <includeDate>false</includeDate>
                    <includeTime>false</includeTime>
                    <includeLevel>true</includeLevel>
                    <includeCategory>false</includeCategory>
                </properties>
            </target>
        </logging>

  • I lost my Visual Voicemail when upgrading to iphone 5. New phone was set up from itunes backup of iphone4 but my Mac tells me there is an iCloud back up of my phone prior to this date. Will my Vis Voicemail be on this and can I get it on my new phone?

    I lost my Visual Voicemail when upgrading to iphone 5. New phone was set up from itunes backup of iphone4 but my Mac tells me there is an iCloud back up of my phone prior to this date. Will my Vis Voicemail be on this and can I get it on my new phone?

    I see.  Apple's documentation on what is included in the iCloud backup doesn't explicitly say that it contains voicemails, but that doesn't mean it does not.  You would just have to try restoring the backup to find out. 
    To restore to your iCoud backup you have to start by erasing the phone.  Go to Settings>General>Reset and tap Erase All Content and Settings.  Then go through the setup screens on the phone and when given the option, choose Restore from iCloud backup.  You will then sign into your iCloud account, accept the terms and conditions, then choose the backup you wish to restore from.  To see an older backup, you may need to tap "Show older backups" (see image below).  Be sure your phone is connected to wifi and your charger as this may take some time to finish.
    If this does not recover your voicemails, you can check to see if you have an older iTunes backup that may contain them.  Available backups are shown in iTunes Preferences>Devices on the Backups list.
    If all else fails, you could try contacting your carrier.  Voicemail is a carrier feature and they may have an archive you could access.

  • Migration Assistant Copied System Preferences from a Third HD!

    I used Migration Assistant to copy files off an iMac and onto a new HD in a MacPro. I purchased a second HD for the MacPro especially for this occasion because I wanted to leave the original MacPro HD intact. At this point, I had two HD's in the MacPro. After installing Snow Leopard, Migration Assistant copied all files and users as expected but something very strange happened:
    1. iMac is 10.6.5 but new HD has 10.6
    2. System Preferences were taken from the existing HD in the MacPro
    I knew there was something wrong because the desktop image was from the original MacPro HD.
    What's more annoying is that I completely wiped the new HD using Disk First Aid and removed the original HD from the MacPro so I could start the entire migration process again. Before quitting Disk First Aid, I noticed that it said 800mb had been used even though I had zero'd out everything.
    Again, for the second attempt I decided to remove the original HD from the MacPro and just leave the new drive in there, but it did it again.
    1. Question - If I had assigned Migration Assistant to copy files from the iMac HD why did I end up with System Preferences from the original MacPro HD?
    2. Question - After completely removing the original MacPro HD from the machine, why did Migration Assistant set up the new HD with the System Preferences on an HD that I had completely removed from the machine?
    I know all I have to do is use Software Update to bring it back up to 10.6.5 but it's really annoyed me because now I am wondering about of all the 500 gigs and what files may have been affected (hopefully none). I've had a quick look through the contents but I won't be able to tell because there are so many of them. And do I really want to spend time digging around in the Library of the iMac to copy across the System Preferences to the new HD and then remove what shouldn't have been there in the first place? I don't think so, and I shouldn't have to.
    I do wish Apple would have their software do what it says and not go digging around on another HD that was lying dormant for this exercise, especially after removing it for the second attempt. It's wasting so much of my time.
    Any thoughts, opinions, excuses and remedies would be greatly welcomed.
    Thanks in advance.
    Message was edited by: inknpaper

    inknpaper wrote:
    I used Migration Assistant to copy files off an iMac and onto a new HD in a MacPro. I purchased a second HD for the MacPro especially for this occasion because I wanted to leave the original MacPro HD intact. At this point, I had two HD's in the MacPro. After installing Snow Leopard, Migration Assistant copied all files and users as expected but something very strange happened:
    You mean you installed OSX on the new drive. Apparently you used a 10.6.0 disc.
    Then, presumably, your Mac re-started (from the new disk), you set up a user account, then started +Migration Assistant.+
    Migration Assistant doesn't install or copy OSX; whatever version of OSX you put on that drive is still there.
    2. System Preferences were taken from the existing HD in the MacPro
    Extremely doubtful.
    You have an extra user account (the one you set up after installing OSX and before doing the Migration). Unless you changed it, that account will have the default desktop picture.
    Are you sure the account you transferred has a different desktop picture than it did on the iMac? If so, is it the default?
    What's more annoying is that I completely wiped the new HD using Disk First Aid and removed the original HD from the MacPro so I could start the entire migration process again. Before quitting Disk First Aid, I noticed that it said 800mb had been used even though I had zero'd out everything.
    Yes; that's the partition map and empty directories.
    1. Question - If I had assigned Migration Assistant to copy files from the iMac HD why did I end up with System Preferences from the original MacPro HD?
    As above, I don't think you did. Be sure which account you're logged-on to.
    For best results, start over, and use +Setup Assistant+ instead of +Migration Assistant,+ so you don't end up with extra accounts. See [Setting up a new Mac from an old one or its backups|http://web.me.com/pondini/AppleTips/Setup.html] (or use the link in *User Tips* at the top of this forum), and note the green box there.

  • Calling1.4.1 signed applet from Javascript causes keyboard/focus problems

    Pretty sure there's a JRE bug here, but I'm posting to forums before I open one in case I'm missing something obvious :-)
    This issue may be specific to IE, I haven't tested elsewhere yet. Our web application is centered around a signed applet that is initialized with XML data via Javascript. We first noticed the problem when our users started upgrading from the 1.3.x plug-in to the 1.4.x plug-in. The major symptom was that shortcut keys stopped working. I debugged the problem off and on for about a month before I boiled it down to a very simple program that demonstrates the issue (included below). Basically, the program has a function that adds a JButton to a JPanel and registers a keyboard listener (using the new DefaultKeyboardFocusManager class) that prints a message to the console. This function is called by the applet's init() method, as well as by a public method that can be called from Javascript (called callMeFromJavascript()). I also included a very simple HTML file that provides a button that calls the callMeFromJavascript() method. You can test this out yourself: To recreate, compile the class below, JAR it up, sign the JAR, and put in the same dir with the HTML file. Load the HTML file in IE 5.0 or greater, and bring the console up in a window right next to it. Now click the button that says init--you should see the small box appear inside the button that indicates it has the focus. Now press some keys on your keyboard. You should see "KEY PRESSED!!!" appearing in the console. This is proper behavior. Now click the Init Applet from Javascript button. It has removed the button called init, and added one called "javascript". Press this button. Notice there is no focus occurring. Now press your keyboard. No keyboard events are registered.
    Where is gets interesting is that if you go back and make this an unsigned applet, and try it again, everything works fine. This bug only occurs if the applet is signed.
    Furthermore, if you try it in 1.3, signed or unsigned, it also works. So this is almost certainly a 1.4 bug.
    Anyone disagree? Better yet, anyone have a workaround? I've tried everything I could think of, including launching a thread from the init() method that sets up the components, and then just waits for the data to be set by Javascript. But it seems that ANY communication between the method called by Javascript and the code originating in init() corrupts something and we don't get keyboard events. This bug is killing my users who are very reliant on their shortcut keys for productivity, and we have a somewhat unique user interface that relies on Javascript for initialization. Any help or suggestions are appreciated.
    ================================================================
    Java Applet (Put it in a signed JAR called mainapplet.jar)
    ================================================================
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class MainApplet extends JApplet implements KeyEventDispatcher
        JPanel test;
        public void init()
            System.out.println("init called");
            setUp("init");
        public void callMeFromJavascript()
            System.out.println("callMeFromJavascript called");
            setUp("javascript");
        private void setUp(String label)
            getContentPane().removeAll();
            test = new JPanel();
            getContentPane().add( test );
            JButton button = new JButton(label);
            test.add( button );
            test.updateUI();
            DefaultKeyboardFocusManager.getCurrentKeyboardFocusManager().addKeyEventDispatcher(this);
        public boolean dispatchKeyEvent(KeyEvent e)
            System.out.println("== KEY PRESSED!!! ==");
            return false;
    }================================================================
    HTML
    ================================================================
    <form>
    <APPLET code="MainApplet" archive="mainapplet.jar" align="baseline" id="blah"
         width="200" height="400">
         No Java 2 SDK, Standard Edition v 1.4.1 support for APPLET!!
    </APPLET>
    <p>
    <input type="button" onClick="document.blah.callMeFromJavascript();" value="Init Applet via Javascript">
    </form>

    I tried adding the requestFocus() line you suggested... Same behavior.
    A good thought, but as I mention in my description, the applet has no trouble gaining the focus initially (when init() is called). From what I have seen, it is only when the call stack has been touched by Javascript that I see problems. This is strange though: Your post gave me the idea of popping the whole panel into a JFrame... I tried it, and the keyboard/focus problem went away! It seems to happen only when the component hierarchy is descended from the JApplet's content pane. So that adds yet another variable: JRE 1.4 + Signed + Javascript + components descended from JApplet content pane.
    And yes, signed or unsigned DOES seem to make a difference. Don't ask me to explain why, but I have run this little applet through quite a few single variable tests (change one variable and see what happens). The same JAR that can't receive keyboard events when signed, works just fine unsigned. Trust me, I'm just as baffled as you are.

Maybe you are looking for

  • Multiple Apple ID management

    I would like to get a little more info on how Apple envisions multiple Apple ID management in families and businesses. When the IDs first appeared, they were just used to buy equipment. Since the value of the purchase was a tangible physical object,

  • How do I get the color wheel to stop spinning?

    how do I get the color wheel to stop spinning?

  • Test IDOC inbound processing in WE19

    Hello, I want to test an inbound processing for an IDOC in WE19. I don't have any message so i enter 'via message type' in the initial screen. Then i fill the segments/fields of the presented segments that i think are necessary and also some data in

  • I updated to cc2014, do I need to keep the cc version?

    Hello Everyone, I updated to cc2014, do I need to keep the cc version? For example, Do I need to keep Premiere Pro CC if I have Premiere Pro 2014?

  • Overlay creator crashing InDesign

    Hello, I've been working with DPS in InDesign CS5.5 with no problems. About five days ago I updated to the current Folio Producer Tools and Folio Panel Tools for CS5.5 and have had no problems. Today out of the blue, every time I try to open the Over