Ejemplo n.º 1
0
        ///
        ///	 <summary> *  </summary>
        ///
        private JDFBinderySignature initBinderySignature(string catalog)
        {
            JDFBinderySignature bs = (JDFBinderySignature)theNode.addResource(ElementName.BINDERYSIGNATURE, EnumUsage.Input);

            bs.setBinderySignatureType(EnumBinderySignatureType.Fold);
            bs.setFoldCatalog(catalog);
            int f = StringUtil.parseInt(StringUtil.token(catalog, 0, "-").Substring(1), 0) / 2;

            if (f > 0)
            {
                int fx = f;
                int fy = 1;
                if (f >= 8)
                {
                    fx /= 2;
                    fy *= 2;
                }
                bs.setNumberUp(new JDFXYPair(fx, fy));
            }

            return(bs);
        }
Ejemplo n.º 2
0
        public virtual void testDieLayoutStrip()
        {
            JDFBinderySignature bs = stripParams.appendBinderySignature();

            bs.setBinderySignatureType(EnumBinderySignatureType.Die);
            JDFDieLayout dl = bs.appendDieLayout();
            JDFStation   s  = dl.appendStation();

            s.setStationAmount(12);
            s.setStationName("MyStation");
            JDFSignatureCell[] scs = new JDFSignatureCell[3];
            JDFPreview         pv0 = (JDFPreview)n.addResource(ElementName.PREVIEW, null, null, null, null, null, null);

            string[] index = { "0 ~ 2", "3 ~ 8", "9 ~ 11" };
            for (int i = 0; i < 3; i++)
            {
                JDFSignatureCell sc = scs[i] = bs.appendSignatureCell();
                sc.setStationName("MyStation");
                JDFPreview pv = (JDFPreview)pv0.addPartition(EnumPartIDKey.CellIndex, index[i]);
                pv.setURL("file://foo" + i + ".vrml");
                pv.setAttribute("PreviewFileType", "VRML");
                pv.setAttribute("PreviewUsage", "Animation");
                sc.refElement(pv);
            }

            scs[0].setXMLComment("This represents 3 times pageList 0");
            scs[0].setDescriptiveName("Strawberry lid");
            scs[0].setFrontPages(new JDFIntegerList("0 0 0"));

            scs[1].setFrontPages(new JDFIntegerList("1 1 1 1 1 1"));
            scs[1].setXMLComment("This represents 6 times pageList 1");
            scs[1].setDescriptiveName("Raspberry lid");

            scs[2].setFrontPages(new JDFIntegerList("2 2 2"));
            scs[2].setXMLComment("This represents 3 times pageList 2");
            scs[2].setDescriptiveName("Blueberry lid");

            d.write2File(sm_dirTestDataTemp + "DieStationStrip.jdf", 2, false);
        }