Create bookmark and set the Page Destination Script

Greetings,

I created a batch Script that will create children bookmarks and set the destination page.

Bookmarks are listed in the script in the order in which they appear in ascending order.  (for example, Name1, name2, Name3, name4)

However, once the script is run, the bookmarks are inserted in descending order. for example (Name3, name4, Name1, name2).

Can someone advise please how do I get the script to create bookmarks in ascending order, as noted in the script?

var bm =
this.bookmarkRoot.createChild ("Name1", "this.pageNum = 0");
this.bookmarkRoot.createChild ("Name2", "this.pageNum = 1");
this.bookmarkRoot.createChild ("Name3", "this.pageNum = 2");
this.bookmarkRoot.createChild ("Conjoint4", "this.pageNum = 3");

var bm = this.bookmarkRoot.children [0];

BM. Color = color.red;

The script should also be changed to all bookmarks in red color.  The script for color bookmarks only works on the first bookmark.  Any intervention on changing the script for this would be most appreciated as well?

Thank you.

Use something like this:

var bm;

this.bookmarkRoot.createChild ("Bill Smith","this.pageNum = 0", 0);

BM = this.bookmarkRoot.children [0];

BM. Color = color.red;

this.bookmarkRoot.createChild ("David Smith", "this.pageNum = 1", 1 ");

BM = this.bookmarkRoot.children [1];

BM. Color = color.red;

Tags: Acrobat

Similar Questions

  • Help with excel import and delete the page script

    Hello. I will try to make it as simple as possible. I have some data from excel (saved as delimited by tabs) that I need to import in a 5 PDF page. I use the script below to import, and it works fine. All import fields and records the individual (one for each record) PDF. However, I need to extend this functionality by removing some pages before it saves the document by looking at the different boxes. The code below is what I use to import the records.

    // specify the filename of the data file
    var fileName = "/Users/MacMike/Desktop/Test.txt";  // the tab delimited text file containing the data
    var outputDir = "/Users/MacMike/Desktop/Dump/";    // make sure this ends with a '/'
    
    var err = 0;
    var idx = 0;
    while (err == 0) {
        err = this.importTextData(fileName, idx);    // imports the next record
    
        if (err == -1)
            app.alert("Error: Cannot Open File");
        else if (err == -2) 
            app.alert("Error: Cannot Load Data");
        else if (err == 1)
            app.alert("Warning: Missing Data");
        else if (err == 2)
            app.alert("Warning: User Cancelled Row Select");
        else if (err == 3)
            app.alert("Warning: User Cancelled File Select");
        else if (err == 0) {
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf"); // saves the file
            idx++;
        }
    }
    

    As I said before you import works surprisingly well.

    My PDF consists of 5 pages (info-registration, p1 = Dir-contract = p0, p2 = contract ndarp-brand, p3 = takes-contract, p4 = agreement must be brand). My idea is that on the import of data, the script will look at a few check boxes and determine which contracts to remove on the PDF and then save. I wrote the syntax of which, in my view, what it should look like. I'm not a programmer and know just a little bit. I looked through the documentation and this is what I came with. I don't know how to combine to work. Here's the code I came up with that.

    var dir = this.getField("Associate Director"); // checkbox
    var aldir = this.getField("Alumni Director"); // checkbox
    
    var fac = this.getField("Facilitator"); // checkbox
    var alfac = this.getField("Alumni Facilitator"); // checkbox
    
    var oyb = this.getField("Optimize Your Brain"); //checkbox
    var poyb = this.getField("DVD and Workbook Previously Purchased"); // checkbox
    
    // Below are all the possible training options.
    if (dir.value=="Checked" || aldir.value=="" || fac.value=="" || alfac.value=="" || oyb.value=="" || poyb.value=="") {
        this.deletePages({nStart:3, nEnd:4})
    }
    else if (dir.value=="" || aldir.value=="Checked" || fac.value=="" || alfac.value=="" || oyb.value=="" || poyb.value=="") {
        this.deletePages({nStart:3, nEnd:4})
    }
    
    else if (dir.value=="" || aldir.value=="" || fac.value=="Checked" || alfac.value=="" || oyb.value=="" || poyb.value=="") {
        this.deletePages({nStart:2, nEnd:4})
    }
    else if (dir.value=="" || aldir.value=="" || fac.value=="" || alfac.value=="Checked" || oyb.value=="" || poyb.value=="") {
        this.deletePages({nStart:2, nEnd:4})
    }
    
    else if (dir.value=="" || aldir.value=="" || fac.value=="Checked" || alfac.value=="" || oyb.value=="Checked" || poyb.value=="") {
        this.deletePages({nStart:2, nEnd:2})
    }
    else if (dir.value=="" || aldir.value=="" || fac.value=="" || alfac.value=="Checked" || oyb.value=="Checked" || poyb.value=="") {
        this.deletePages({nStart:2, nEnd:2})
    }
    else if (dir.value=="" || aldir.value=="" || fac.value=="Checked" || alfac.value=="" || oyb.value=="" || poyb.value=="Checked") {
        this.deletePages({nStart:2, nEnd:2})
    }
    else if (dir.value=="" || aldir.value=="" || fac.value=="" || alfac.value=="Checked" || oyb.value=="" || poyb.value=="Checked") {
        this.deletePages({nStart:2, nEnd:2})
    }
    
    else if (dir.value=="Checked" || aldir.value=="" || fac.value=="" || alfac.value=="" || oyb.value=="Checked" || poyb.value=="") {
        this.deletePages(none) // I realize this is incorrect. Just showing that this option results in no deleted pages.
    }
    else if (dir.value=="" || aldir.value=="Checked" || fac.value=="" || alfac.value=="" || oyb.value=="Checked" || poyb.value=="") {
        this.deletePages(none) // I realize this is incorrect. Just showing that this option results in no deleted pages.
    }
    else if (dir.value=="Checked" || aldir.value=="" || fac.value=="" || alfac.value=="" || oyb.value=="" || poyb.value=="Checked") {
        this.deletePages(none) // I realize this is incorrect. Just showing that this option results in no deleted pages.
    }
    else if (dir.value=="" || aldir.value=="Checked" || fac.value=="" || alfac.value=="" || oyb.value=="" || poyb.value=="Checked") {
        this.deletePages(none) // I realize this is incorrect. Just showing that this option results in no deleted pages.
    }
    
    else if (dir.value=="" || aldir.value=="" || fac.value=="" || alfac.value=="" || oyb.value=="Checked" || poyb.value=="") {
        this.deletePages({nStart:1, nEnd:2})
    }
    else (dir.value=="" || aldir.value=="" || fac.value=="" || alfac.value=="" || oyb.value=="" || poyb.value=="Checked") {
        this.deletePages({nStart:1, nEnd:2})
    }
    

    How to combine these two so that I can create a document temp import my data, check the boxes to check off and delete the appropriate pages and save the file and then go to the next record? I got the first part done. It imports large and has the right, but I don't know what to do next. Thanks for any help!

    Or y at - it another way to do this?


    Michael

    Wow. Ok. I had it works beautifully. There was a lot of trial and error. Because the script as it was would have, would open the original PDF, delete the pages needed, then save the file. While it would be to go to the next record is missing pages in PDF and bomb to open. I hunted and searched for a way to do this. I found "this.insertPages" in the documentation. Finally, what worked was so move the "save under" in the service and put it under every variation of check. So now when checking the boxes, he performs the check, removes the mandatory pages, stops, insertions of back in deleted pages from the original file, leave the service and finally goes to the next record.

    Here is my final script:

    // This code looks at an excel (tab delimited) file, imports the records into a PDF form 10 Pages long.
    // Then checks a series of checkboxes and deletes the pages that aren't associated with first page.
    // After it deletes these pages it reinserts the deleted pages so it can do the checks for the next record in the (tab delimited) file.
    
    // variables for importing excel data
    var err = 0;
    var idx = 0;
    var fileName = "/Users/MacMike/Desktop/Test.txt";  // the tab delimited text
    var outputDir = "/Users/MacMike/Desktop/Dump/";    // make sure this ends with a '/'
    
    //Checking a bank of 6 checkboxes and determine which pages need to be deleted, save the file, and the insearch the deleted pages again.
    function seekandDestroy() {
        if (dir.value=="Checked" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Off") {
            this.deletePages({nStart:6, nEnd:9})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:5, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:6, nEnd:9 });
        }
        else if (dir.value=="Off" && aldir.value=="Checked" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Off") {
            this.deletePages({nStart:6, nEnd:9})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:5, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:6, nEnd:9 });
        }
    
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Checked" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Off") {
            this.deletePages({nStart:3, nEnd:9})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:9 });
        }
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Checked" && oyb.value=="Off" && poyb.value=="Off") {
            this.deletePages({nStart:3, nEnd:9})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:9 });
        }
    
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Checked" && alfac.value=="Off" && oyb.value=="Checked" && poyb.value=="Off") {
            this.deletePages({nStart:3, nEnd:5})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:5 });
        }
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Checked" && oyb.value=="Checked" && poyb.value=="Off") {
            this.deletePages({nStart:3, nEnd:5})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:5 });
        }
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Checked" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Checked") {
            this.deletePages({nStart:3, nEnd:5})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:5 });
        }
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Checked" && oyb.value=="Off" && poyb.value=="Checked") {
            this.deletePages({nStart:3, nEnd:5})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:2, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:3, nEnd:5 });
        }
    
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Checked" && poyb.value=="Off") {
            this.deletePages({nStart:1, nEnd:5})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:0, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:1, nEnd:5 });
        }
        else if (dir.value=="Off" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Checked") {
            this.deletePages({nStart:1, nEnd:5})
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
            this.insertPages({nPage:0, cPath:"/Users/MacMike/Desktop/TT Reg & Contracts.pdf", nStart:1, nEnd:5 });
        }
        else if (dir.value=="Checked" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Checked" && poyb.value=="Off") {
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
        }
        else if (dir.value=="Checked" && aldir.value=="Off" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Checked") {
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
        }
        else if (dir.value=="Off" && aldir.value=="Checked" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Checked" && poyb.value=="Off") {
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
        }
        else if (dir.value=="Off" && aldir.value=="Checked" && fac.value=="Off" && alfac.value=="Off" && oyb.value=="Off" && poyb.value=="Checked") {
            this.saveAs(outputDir + this.getField("Full Name (First Last)").value + "-" + this.getField("Event Title").value + ".pdf")
        }
    }
    
    // Imports records does the above function then go the next record, all the while doing error reporting.
    while (err == 0) {
        err = this.importTextData(fileName, idx);    // imports the next record
    
        if (err == -1)
            app.alert("Error: Cannot Open File");
        else if (err == -2)
            app.alert("Error: Cannot Load Data");
        else if (err == 1)
            app.alert("Warning: Missing Data");
        else if (err == 2)
            app.alert("Warning: User Cancelled Row Select");
        else if (err == 3)
            app.alert("Warning: User Cancelled File Select");
        else if (err == 0) {
            var dir = this.getField("Associate Director"); // checkbox
            var aldir = this.getField("Alumni Associate Director"); // checkbox
            var fac = this.getField("Facilitator"); // checkbox
            var alfac = this.getField("Alumni Facilitator"); // checkbox
            var oyb = this.getField("Optimize Your Brain Site Coordinator"); //checkbox
            var poyb = this.getField("DVD and Workbook Previously Purchased"); // checkbox
            seekandDestroy(dir, aldir, fac, alfac, oyb, poyb); //performs the above function
            idx++; //goes to next record
        }
    }
    
  • Get and set the value to allow selected rolling Shuffle and facing page

    Hello world

    I work with the page and spread,

    For now, I want to value page spead shuffle and type of document.

    but I just find the function to get and set the value for the Document Pages allow Shuffle using the

    InterfacePtr < IPageLayoutPrefs > iPageLayoutPrefs (static_cast < IPageLayoutPrefs * > (: QueryPreferences (IID_IPAGELAYOUTPREFERENCES, iDocument)))

    It has no function to set and get the value of enable selected rolling Shuffle and facing page

    No one knows about it?

    I thank in advance

    There is no code for this example in the SDK or internet. Just understand and apply the concept.

    Find the code for the shuffle spread and together following spread shuffle...

    // Get active spread
    UIDRef GetActiveSpread() {
        UIDRef spreadRef = UIDRef::gNull;
    
        InterfacePtr layoutData(Utils()->QueryFrontLayoutData());
        if(layoutData) {
      spreadRef = layoutData->GetSpreadRef();
      }
    
      return spreadRef;
    }
    
    // Get spread shuffle of passed in spread
    bool16 GetSpreadShuffle(UIDRef& spreadRef) {
        InterfacePtr spread(spreadRef, UseDefaultIID());
        if(!spread)
      return kFalse;
    
      InterfacePtr iBoolData(spread, IID_IISLANDSPREAD);
        if(iBoolData) {
            return iBoolData->GetBool();
        }
    
        return kFalse;
    }
    
    // Set spread shuffle of passed in spread
    // @param bValue: kTrue = no shuffle, kFalse = allow shuffle
    ErrorCode SetSpreadShuffle(UIDRef spreadRef, bool16 bValue) {
        ErrorCode status = kFailure;
    
        InterfacePtr spreadCmd(CmdUtils::CreateCommand(kSetIslandSpreadCmdBoss));
        if(!spreadCmd)
            return status;
    
        spreadCmd->SetItemList(UIDList(spreadRef));
    
        InterfacePtr iBoolData(spreadCmd, UseDefaultIID());
        if(iBoolData) {
            iBoolData->Set(bValue);
        }
    
        status = CmdUtils::ProcessCommand(spreadCmd);
        return status;
    }
    
  • Can I create a cursor and set the values by myself

    Can I create a cursor and set the values by myself, and it has not been filled by an SQL?

    Thanks in advance

    Yes, you can.
    Use variables with a default value or nvl (some_parameter, some_variable) in your cursor WHERE predicate.
    They provide an example if it isn't clear, since that's all I can think about reading your post...

  • Create bookmarks and organize a new Document

    This is my first shot of adobe and I think he's going to do what I'm trying but it I'm missing something and do not seem to ask the right questions in the help forums. I am trying to create a model that I'll be able to use on a daily basis I receive documents from clients. The model is simply bookmarks under all the content will come from documents being analyzed and perhaps some files added along the way. What I would like to be able to do is to digitize all documents submitted and then organize them in the order that I have stated in the bookmarks. The main thing I want to do is quickly and effectively move the pages in the bookmarks, they belong to which will be universal. For example, I created a document with approximately 15 favorites. How can I move each of the 75 pages into the bookmark so that it runs as it should. For example, some of the bookmarks are labeled salaries, investments, taxes however, the pages of the document are scattered and not in order so they must be organized. I want to be able to locate a document relating to wages and place it under the salary of bookmark.

    one) can I create and save a template/form is simply an empty document with bookmarks? Or can I save this set of bookmarks and add them to scanning in the documents? One is easier than the other?

    (b) once I have scanned documents and bookmarks in place is a way to quickly drag and drop the pages into the appropriate bookmark? Is there a better way to do it?

    Thank you

    Acrobat is a program source of confusion, and I think you need to take a step back. None of the things you describe are really a way of working in Acrobat. There is no such thing as models as you describe, and bookmarks do not exist until you add them to a document.

    So, what actual requirement? I want to make a repeated effectively task (= with the least effort).

    It comes (ignore the order for now).

    1 digitization of 75 pages

    2 turn them into PDF format.

    3. do you have bookmarks to (hopefully) fixed at exactly the same location each time.

    What I would do, is to write JavaScript to create bookmarks, and run whenever. But that requires skills and experience that you will yet, so is there another way...?

    Well, while there are not actually templates, you might be able to do something like what you describe.

    -Carry out a 75-page document (empty if you like)

    -Add bookmarks

    -Save this file as a TEMPLATE. PDF. Save it as you it will certainly break while practicing.

    Now, whenever you want to work

    -Analyze the 75 pages in PDF format (perhaps with Acrobat, perhaps with the software that came with the scanner if he can make it to compare files of size and quality)

    -Save the PDF under TEMP. PDF, close it.

    -Open the MODEL. PDF.

    -Use the tools Panel, select Pages > replace

    -Select TEMP. PDF Version of the file to new pages.

    -Choose replace pages with pages 1 from 1 to 75.

    -Use SAVE as (and not SAVE!) to save this work with a new name of date, client or whatever.

  • How focus a JavaFX Group properly and set the pivot (reverse) by using translations in 3D space?

    Description:

    I m referring to the Oracle tutorial http://docs.Oracle.com/JavaFX/2/transformations/jfxpub-transformations.htm using the transformations.zip source code, which is available for download on this page. I Don t understand why they Center the xylophone in space 3D like this and why they calculate the pivot (reverse) using translations. So they are creating a large number of groups, including rectangles, representing the xylophone, in addition to finally to a group called "cam".    

    class Cam extends Group {     
         Translate t  = new Translate();     
         Translate p  = new Translate();     
         Translate ip = new Translate();     
         Rotate rx = new Rotate();     
         { rx.setAxis(Rotate.X_AXIS); }     
         Rotate ry = new Rotate();     
         { ry.setAxis(Rotate.Y_AXIS); }     
         Rotate rz = new Rotate();     
         { rz.setAxis(Rotate.Z_AXIS); }     
         Scale s = new Scale();     
         public Cam() { 
              super(); getTransforms().addAll(t, p, rx, rz, ry, s, ip); 
         }     
    }    
    
    final Cam camOffset = new Cam();    
    final Cam cam = new Cam();    
    ...    
    camOffset.getChildren().add(cam);    
    ...    
    final Scene scene = new Scene(camOffset, 800, 600, true);    
    ... 
    

    The Group "cam" is added to another group called "camOffset", which is added to the 'scene' as root the node.

    Until there , everything is understandable to me, but there is a method, called "frameCam (.)" which calls 4 other methods: ""

    public void setCamOffset(final Cam camOffset, final Scene scene) {         
         double width = scene.getWidth();         
         double height = scene.getHeight();         
         camOffset.t.setX(width/2.0);         
         camOffset.t.setY(height/2.0);     
    }    
    
    //=========================================================================    
    // setCamScale    
    //=========================================================================    
    
    public void setCamScale(final Cam cam, final Scene scene) {        
         final Bounds bounds = cam.getBoundsInLocal();         
         final double pivotX = bounds.getMinX() + bounds.getWidth()/2;         
         final double pivotY = bounds.getMinY() + bounds.getHeight()/2;         
         final double pivotZ = bounds.getMinZ() + bounds.getDepth()/2;         
         double width = scene.getWidth();         
         double height = scene.getHeight();         
         double scaleFactor = 1.0;         
         double scaleFactorY = 1.0;         
         double scaleFactorX = 1.0;         
    if (bounds.getWidth() > 0.0001) {            
         scaleFactorX = width / bounds.getWidth(); // / 2.0;        
    }        
    if (bounds.getHeight() > 0.0001) {            
         scaleFactorY = height / bounds.getHeight(); //  / 1.5;         
    }        
    if (scaleFactorX > scaleFactorY) {            
         scaleFactor = scaleFactorY;         
    } else {            
         scaleFactor = scaleFactorX;         
    }        
         cam.s.setX(scaleFactor);         
         cam.s.setY(scaleFactor);         
         cam.s.setZ(scaleFactor);     
    }    
    
    //=========================================================================    
    // setCamPivot    
    //=========================================================================    
    
    public void setCamPivot(final Cam cam) {        
         final Bounds bounds = cam.getBoundsInLocal();         
         final double pivotX = bounds.getMinX() + bounds.getWidth()/2;         
         final double pivotY = bounds.getMinY() + bounds.getHeight()/2;        
        final double pivotZ = bounds.getMinZ() + bounds.getDepth()/2;         
    
    //*1*        
         cam.p.setX(pivotX);         
         cam.p.setY(pivotY);         
         cam.p.setZ(pivotZ);         
    //*1*        
    
    //*2*        
         cam.ip.setX(-pivotX);         
         cam.ip.setY(-pivotY);         
         cam.ip.setZ(-pivotZ);         
    //*2*     }    
    
    //=========================================================================    
    // setCamTranslate    
    //=========================================================================    
    
    public void setCamTranslate(final Cam cam) {        
         final Bounds bounds = cam.getBoundsInLocal();         
         final double pivotX = bounds.getMinX() + bounds.getWidth()/2;         
         final double pivotY = bounds.getMinY() + bounds.getHeight()/2;         
         cam.t.setX(-pivotX);         
         cam.t.setY(-pivotY);     
    } 
    

    If the method ' setCamScale (...) 'is understandable,' setCamOffset (...) ' puts the root node ('camOffset') in the center of the screen, but I Don t understand the 2 following methods at all. Of course, the child ("cam") is not centered, by putting just the root node ('camOffset') in the center of the screen, but how they focus the xylophone / "cam" and set the pivot, using translations:

    Questions:

    1. Why they use 3 different translations (', 'ip', 'p')?
    2. Referring to ' setCamPivot (...) ': Why they are the first translation of 'cam.p' to "pivotX", 'pivotY' and 'pivotZ' and then 'cam.ip' to '-pivotX', '-pivotY' and '-pivotZ' (marked in the source code with * 1 * and * 2 *)? Should he not just put the Group at his position, where it has been positioned before, as if the method has never been called? That would be my guess, because I expect that an object is placed in the same position as before, if I first move with the values X, Y, Z and then return with the same values - X, - Y, - Z in the opposite direction.
    3. Even with the method ' setCamTranslate (...) ' ': Why use another translation "cam.t", moving the Group ("cam") with the same values "-pivotX', '-pivotY' (and not '-pivotZ'), which they used in the"setCamPivot (...) method `?

    Annotations:

    Of course it works, the xylophone is located in the center of the screen and could turn perfectly, without change of rotation point / pivot point, but I Don t understand how they did it. I read everything about layoutBound, boundsInLocal, boundsInParent, blogs about page layout and page layout goes into javaFX https://blogs.oracle.com/jfxprg/entry/the_peculiarities_of_javafx_layout and http://amyfowlersblog.wordpress.com/2011/06/02/javafx2-0-layout-a-class-tour/ and finally a large number of questions to stackoverflow, but I still Don t understand the meaning behind the methods stated.

    Before the call of ' frameCam (...) ', they ask:

    double halfSceneWidth = 375;  // scene.getWidth()/2.0;     
    double halfSceneHeight = 275;  // scene.getHeight()/2.0;    
    cam.p.setX(halfSceneWidth);    
    cam.ip.setX(-halfSceneWidth);    
    cam.p.setY(halfSceneHeight);    
    cam.ip.setY(-halfSceneHeight); 
    

    I deleted these lines, because it doesn't change anything.

    The base in place, is that there are three defined different rotations, one around each axis. Of course, these could be combined into a single rotation, but doing so would make the geometry in the mouse dragging very complex managers. As it is, the degree of rotation around each axis can be calculated and changed independently.

    In general, the rotations are defined by an angle, an axis and a (pivot) point. The axis is a 3D vector and goes through the pivot point; the rotation is around this axis through that point.

    In the configuration in the example, the pivot of each of the individual rotations is set to the default (0,0,0). Because we really want the rotation to be around the center of the group, not the original, the Group translates first point appropriate pivot (ip), the rotations are applied then (around (0,0,0) after translation by ip), then the group is reflected in its location of origin (p). These operations are not commutative, yes show ip, then the rotation, then p is not the same as when you run ip, then p, then the rotation (in the second, ip and p would cancel and rotation would be about (0,0,0) instead of around the Center).

    For good measure, there is a scale, that is also applied after ip (so that scaling occurs from the Center, not the original) and then a final translation.

    The final effect is that there is a lot of transformations that can be controlled independently. There is a scale (s), a rotation about each axis (rx, ry, rz), and a translation (t). The p in translations and its inverse ip are just "housekeeping" to ensure that rotation and scaling are done from the center of the screen, instead of (0,0,0).

    So:

    1. Why they use 3 different translations (', 'ip', 'p')?

    p and ip are translations for the rotation and scaling are done from the Center and not to the origin. t is a general translation, the user sees.

    Referring to ' setCamPivot (...) ': Why they are the first translation of 'cam.p' to "pivotX", 'pivotY' and 'pivotZ' and then 'cam.ip' to '-pivotX', '-pivotY' and '-pivotZ' (marked in the source code with * 1 * and * 2 *)? Should he not just put the Group at his position, where it has been positioned before, as if the method has never been called?

    He puts the group to its original position, but other changes are between p and ip. These transformations behave differently (in a planned way) because the group is translated when they are applied.

    Even with the method ' setCamTranslate (...) ' ': Why use another translation "cam.t", moving the Group ("cam") with the same values "-pivotX', '-pivotY' (and not '-pivotZ'), which they used in the"setCamPivot (...) method `?

    The t values are changed in the mouse Manager (with alt-middle mouse button-drag, which I can't test actually using my trackpad...). As you have noted, the effect of p and IP translation cancel out, so we end up with t, which can be changed by the user. They could have combined t and p a single transformation, but updated since the mouse Manager would have been more delicate, and the intent of the code would be less clear.

  • How to set the page template for a page in app

    I've been looking for a way to re - assign a specific page to a different page template, and I must be blind. I did it with the regions and reports, but never a whole page. The closest I can find is how to set the default page for an application model template. What I have is a printable form that they want in a specific format. I was able to code the whole thing into a region of PL/SQL, but I was hoping that I could take an existing page template and modify the model to different regions in the areas I would like to.

    Can someone help me find this? I have already created a copy of the page template I want to twist.

    If you are in the tree view, double-click the entry of title of page (top); If you are in the component view, simply click the edit button in the page area. Either way will take you to the screen of the Page change. in the display attributes section, you will see a Page Model drop-down list.

    -David

  • How can I enter BIOS compaq610 screen and set the date, time

    How can I enter BIOS compaq610 screen and set the date, time

    Hello

    See Page 94 or Page 100 (according to what's relevant) of your & Maintenance Guide.

    Kind regards

    DP - K

  • Hide the page looping script

    Hello

    I use jdeveloper 11.1.1.7.0.

    I have an ADF Application with ADF, security (auth-method FORM).

    In my login page (Login.jspx) users are fully authenticated and redirected to another secure page. Everything works beautifully.

    But on Login.jspx users, right-click on the page and select the option "View source" that says:

    -Chrome on 45.0.2454.101: page of script for looping

    -Mozilla FireFox 37.0.1: page of script for looping

    -Internet Explorer 9.0.8112.16421: 'Real' of the page source code

    What I want to know is how to prevent users from viewing the page looping script.

    I don't like to show the source code 'real' of the page (like IE for this).

    I do not want to hide the actual code of the page, but I need to hide the script loopback page because I think that it contains information about my request that users know not.

    Is it possible to take measures to avoid the page of script loopback?

    Attached files:

    Login.html: my looping script page

    Login.zip: Login.jspx + web.xml


    Concerning

    Roberto

    Refer

    Oracle ADF - leaving Competition In The Dust: ADF avoiding loopback script in servlets

  • Error when you try to create a region of the page generated by the anonymous pl/sql block

    Hi guys I tried to create a region of the page which is the source and anonymous pl/sql block and I have been making a few mistakes. Basically what I want this region to do, is to give the current user of the application one summarized data compared to there user name which is: app_user the code I used was

    declare

    ven_ret varchar2 (15);

    BEGIN

    ven_ret: = (select u.vendor of USERS4ARCHITEC u )


    where

    u.e_mail = V ('APP_USER')

    and not exists (select null from arch_tbl I where u.vendor = i.vendor and user_id = V ('APP_USER'))

    order u.vendor in ven_ret);

    END;

    /

    the structure of the table to the USERS4ARCHITEC table is

    User varchar2 (15) vendor2 (20)

    ----------------------------------------------------------------------------------

    user@1                                                                          sap

    user@1                                                                          oracle

    user@1                                                                           IBM                                                            <---------sample data

    user@2                                                                          Oracle

    user@2                                                                          cisco

    the structure of the table to the arch_tbl table is

    user                                                     vendor

    --------------------------------------------------------------

    user@1                                                 sap

    So if user@1 logs in the application of the region using the pl/sql code code above should display oracle and IBM, because these two sellers are always under his username that he has already used a form to insert the sap into the arch_tbl table. Please tell me what I'm doing wrong here. Thank you guys

    Why would you build a type psedu at APEX report MANUALLY when you can just build a relationship with the same selection you use now for your pl/sql dynamic region?  What is the purpose of building your own report when the tool made for you?

    Thank you

    Tony Miller
    Software LuvMuffin
    Ruckersville, WILL

  • How to get and set the length and the width of the content of the layer?

    How to get and set the length and the width of the content of the layer

    All layers are packed not equal. a layer as adjustment have no limits. Layer to smart object can have two different sizes. The size of the object and the size of the object may be transformed. All smart object layers have an associated transform. To transform a smart object layers you need to work with the size of the object the generated pixels fot the layer. Text layer can be resized with a transform or by changing the font size. Pixelated layers are resize via a transformation.  The script method is resize.  When you resize the number of pixelsits made by interpolation. You can specify what method to use or set Photoshop interpolation preferably by default.

    There is also a bug in Photoshop scripts if you pause the story said make a selection and use resize. Photoshop will properly support up to a State before where you suspended history. This bug seems to be in all versions of Photoshop.

    If you look ate the script in my bug report, you should get a good idea of how to resize a layer.

    Photoshop: Bug Script resize the rear paper folded to a history State

  • Create a validation on the Page IExpense

    Hello

    I need to create a validation on the page of iExpense, where... the user selects the type of expense and adds details such as start date total etc...

    When he clicks on the next button, validation can take place when when checking should be done with the database to search for if the user has created the same before report. If so it should allow user to create the new report.

    The problem I m facing here is... the validation must be done at the next button... and this button is common on all pages as it's a track.

    How can I do this... I m totally confused.

    Can someone help me fulfill this requirement. I know I should do the extension, I want to know what objects all I extend.

    Thanks in advance,
    Kone

    Kaushik,

    When you follow the method mentioned by AJ, you can find VO named "ExpenseTypesVO" under the path "oracle.apps.ap.oie.common.server".

    According to the statement present in it, required table where we need to insert the new type of expense is "AP_EXPENSE_REPORT_PARAMS".

    Kind regards
    Anand

  • How to create Mulitple tab in the Page

    Dear all,
    How to create Mulitple tab in the Page (UI)

    One way is to download the OA Framework Metalink Dev guide. You can also navigate to Jdevdoc (under your Jdev installation) and find the index.html file. There you have the reference to the Dev Guide. You can get the right information here too.

    Concerning
    Sumit

  • I touched something and now the page up key goes back to the previous page, instead of a screen. How can I fix it?

    Normally, the previous page button moves a screen and the page down key moves one screen down. I hit a combination of keys by mistake and now the page up key load previous page while the next page button loads a page, I'll be back, mimicking the previous buttons and following. I can still use the SPACEBAR to go down one screen and the arrow keys, end and home work normally. The page of buttons function normally outside Firefox. What I've done and how to cancel it?

    Have you tried to close and restart Firefox or restart the computer?

  • I have stored more than 120 bookmarks and deleted the names to save space in the quick bookmark bar. Therefore, since the Bard got full, if a bookmark or folder had desciptive text next to it, the text would collapse until just the icon shows. I have

    I have stored more than 120 bookmarks and deleted the names to save space in the quick bookmark bar. Therefore, since the Bard got full, if a bookmark or folder had desciptive text next to it, the text would collapse until just the icon shows. If I hover over the icon, the test appears again. These days, I found easier to rank my favorites in folders, HOWEVER, I do not know which folder is because the text next to the icons folder remains reduced until I have pass the mouse on them. I want to customize it so that the text is fixed next to the icon or folder. How can I do this? Please help and thank you!

    Incredible bookmarks try: https://addons.mozilla.org/firefox/addon/50722

Maybe you are looking for