Ejemplo n.º 1
0
        public virtual void testCutAndStack()
        {
            n.setXMLComment("This is a simple cut and stack layout witrh 2 stacks of one page each (two sided)\n");

            setUpAutomatedInputRunList();
            rl.setDescriptiveName("This is any RunList...");
            lo = (JDFLayout)n.appendMatchingResource(ElementName.LAYOUT, EnumProcessUsage.AnyInput, null);
            lo.setResStatus(EnumResStatus.Available, true);
            lo.setMaxOrd(2);
            lo.setAutomated(true);
            lo.setXMLComment("2 stacks with 2 pages\n" + "The algorithm for calculating which pages go where is:\n" + "Ord + MaxOrd*SheetLoop%(MaxOrd*MaxStack*StackDepth) + StackOrd*StackDepth\n" + "Each set of stacks consumes 2 * 2 * 100 = 400 Pages (4 ContentObjects = 2 front, 2 Back / Sheet * 100 StackDepth");
            lo.setAttribute("StackDepth", "100");
            lo.setAttribute("MaxStack", "2");
            JDFLayout        cover      = (JDFLayout)lo.addPartition(EnumPartIDKey.SheetName, "TheSheet");
            JDFLayout        coverFront = (JDFLayout)cover.addPartition(EnumPartIDKey.Side, EnumSide.Front);
            JDFContentObject co         = coverFront.appendContentObject();

            co.setCTM(new JDFMatrix(1, 0, 0, 1, 0, 0));
            co.setOrd(0);
            co.setAttribute("StackOrd", "0");
            co.setDescriptiveName("Front Page 0,2,4...0, Stack 0");
            co.setXMLComment("this co consumes all pages 0,2,4...198, 400,402,404...598, 800....");

            co = coverFront.appendContentObject();
            co.setCTM(new JDFMatrix(1, 0, 0, 1, 8.5 * 72, 0));
            co.setOrd(0);
            co.setAttribute("StackOrd", "1");
            co.setDescriptiveName("Front Page 0,2,4,...0, Stack 1");
            co.setXMLComment("this co consumes all pages 200,202,204...398, 600,602,604...798, 1000....");

            JDFLayout coverBack = (JDFLayout)cover.addPartition(EnumPartIDKey.Side, EnumSide.Back);

            co = coverBack.appendContentObject();
            co.setCTM(new JDFMatrix(1, 0, 0, 1, 8.5 * 72, 0));
            co.setOrd(1);
            co.setAttribute("StackOrd", "0");
            co.setDescriptiveName("Back Page 1,3,5, Stack 0");
            co.setXMLComment("this co consumes all pages 1,3,5...199, 401,403,405...499, 801....");

            co = coverBack.appendContentObject();
            co.setCTM(new JDFMatrix(1, 0, 0, 1, 0, 0));
            co.setOrd(1);
            co.setAttribute("StackOrd", "1");
            co.setDescriptiveName("Back Page 1,3,5, Stack 1");
            co.setXMLComment("this co consumes all pages 201,203,205...299, 601,603,605...799, 1001....");

            doc.write2File(sm_dirTestDataTemp + "CutStack.jdf", 2, false);
        }