Exemple #1
0
        ///
        ///	 * <param name="icsLevel"> </param>
        ///
        protected internal virtual void makeReadyColorantControl()
        {
            JDFColorantControl cc = (JDFColorantControl)theExpandedNode.getCreateResource(ElementName.COLORANTCONTROL, EnumUsage.Input, 0);
            JDFColorPool       cp = cc.getCreateColorPool();

            for (int i = 0; i < getNCols(); i++)
            {
                string   name = cols.stringAt(i);
                JDFColor c    = cp.getCreateColorWithName(name, null);
                c.setActualColorName(colsActual.stringAt(i));
            }
        }
Exemple #2
0
        public virtual void testCombinedVarnish()
        {
            JDFElement.setLongID(false);
            JDFDoc  d            = new JDFDoc("JDF");
            JDFNode n            = d.getJDFRoot();
            VString vCombiNodes  = new VString("ConventionalPrinting Varnishing", " ");
            VString vSeparations = new VString("Cyan Magenta Yellow Black Varnish", " ");

            n.setCombined(vCombiNodes);

            JDFConventionalPrintingParams cpp = (JDFConventionalPrintingParams)n.addResource(ElementName.CONVENTIONALPRINTINGPARAMS, null, EnumUsage.Input, null, null, null, null);

            cpp.setModuleAvailableIndex(new JDFIntegerRangeList("1 ~ 6"));
            cpp.setModuleIndex(new JDFIntegerRangeList("1 ~ 4 6"));
            cpp.appendXMLComment("Module 0 and 7 are varnishing modules, 1-4 are process colors and 6 is the ink module used to varnish", null);
            n.appendMatchingResource("Component", JDFNode.EnumProcessUsage.AnyOutput, null);
            JDFExposedMedia xm = (JDFExposedMedia)n.appendMatchingResource("ExposedMedia", JDFNode.EnumProcessUsage.Plate, null);

            n.appendNodeInfo();
            JDFMedia media = xm.appendMedia();

            media.setMediaType(EnumMediaType.Plate);
            JDFInk ink = (JDFInk)n.appendMatchingResource("Ink", JDFNode.EnumProcessUsage.AnyInput, null);

            JDFResource     vp           = n.addResource("VarnishingParams", EnumResourceClass.Parameter, EnumUsage.Input, null, null, null, null);
            JDFExposedMedia xmVarnish    = (JDFExposedMedia)n.addResource("ExposedMedia", null, EnumUsage.Input, null, null, null, null);
            JDFMedia        mediaVarnish = xmVarnish.appendMedia();

            mediaVarnish.setAttribute("MediaType", "Sleeve");

            JDFResourceLink    rl = n.getLink(xmVarnish, null);
            JDFColorantControl cc = (JDFColorantControl)n.appendMatchingResource(ElementName.COLORANTCONTROL, JDFNode.EnumProcessUsage.AnyInput, null);

            cc.getCreateDeviceColorantOrder().appendXMLComment("Should the VarnishingParams seps be excluded, as is shown here?", null);
            cc.getCreateDeviceColorantOrder().setSeparations(vSeparations);

            rl.setCombinedProcessIndex(new JDFIntegerList("1"));
            vSeparations.addAll(new VString("PreVarnish Varnish2", " "));

            for (int i = 0; i < vSeparations.Count; i++)
            {
                string sep = vSeparations.stringAt(i);
                ink.addPartition(EnumPartIDKey.Separation, sep);
                if (!sep.Equals("PreVarnish") && !sep.Equals("Varnish2"))
                {
                    xm.addPartition(EnumPartIDKey.Separation, sep);
                }
                if (sep.Equals("Varnish2"))
                {
                    vp.appendXMLComment("full varnishing in a varnishing module with or wihtout a sleeve. Full varnishing means to cover the complete media surface.", null);
                    xmVarnish.addPartition(EnumPartIDKey.Separation, sep);
                    JDFResource varnishPart = vp.addPartition(EnumPartIDKey.Separation, sep);
                    varnishPart.setAttribute("ModuleIndex", "7");
                    varnishPart.setAttribute("VarnishMethod", "Sleeve");
                    varnishPart.setAttribute("VarnishArea", "Spot");
                }
                else if (sep.Equals("Varnish"))
                {
                    vp.appendXMLComment("varnishing in a printing module only  with a mandatory plate. The plate may be exposed or not, for example,  for full varnihing. ", null);
                    // xmVarnish.addPartition(EnumPartIDKey.Separation, sep);
                    JDFResource varnishPart = vp.addPartition(EnumPartIDKey.Separation, sep);
                    varnishPart.setAttribute("ModuleIndex", "6");
                    varnishPart.setAttribute("VarnishMethod", "Plate");
                    varnishPart.setAttribute("VarnishArea", "Full");
                }
                else if (sep.Equals("PreVarnish"))
                {
                    vp.appendXMLComment("varnishing in a varnishing module only with a mandatory prepared sleeve ", null);
                    xmVarnish.addPartition(EnumPartIDKey.Separation, sep);
                    JDFResource varnishPart = vp.addPartition(EnumPartIDKey.Separation, sep);
                    varnishPart.setAttribute("ModuleIndex", "0");
                    varnishPart.setAttribute("VarnishMethod", "Sleeve");
                    varnishPart.setAttribute("VarnishArea", "Full");
                }
            }

            d.write2File(sm_dirTestDataTemp + "varnishing.jdf", 2, true);
        }
Exemple #3
0
        ///
        ///	 * <param name="icsLevel"> </param>
        ///
        protected internal virtual void initColorantControl()
        {
            JDFResourceLink ccLink = null;

            if (thePreviousNode != null)
            {
                ccLink = theNode.linkResource(thePreviousNode.getResource(ElementName.COLORANTCONTROL, EnumUsage.Input, 0), EnumUsage.Input, null);
            }
            if (ccLink == null && theParentNode != null)
            {
                ccLink = theNode.linkResource(theParentNode.getResource(ElementName.COLORANTCONTROL, EnumUsage.Input, 0), EnumUsage.Input, null);
            }

            JDFColorantControl cc = (JDFColorantControl)(ccLink == null ? (JDFColorantControl)theNode.getCreateResource(ElementName.COLORANTCONTROL, EnumUsage.Input, 0) : ccLink.getTarget());

            cc.setResStatus(EnumResStatus.Available, false);

            JDFColorPool cp = (JDFColorPool)theNode.getJDFRoot().getChildByTagName(ElementName.COLORPOOL, null, 0, null, false, false);

            if (cp == null)
            {
                cp = (JDFColorPool)theNode.getCreateResource(ElementName.COLORPOOL, EnumUsage.Input, 0);
                if (theParentNode != null)
                {
                    theParentNode.getCreateResourcePool().moveElement(cp, null);
                }
            }

            cc.refColorPool(cp);
            for (int i = 4; i < getNCols(); i++)
            {
                cc.getCreateColorantParams().appendSeparation(cols.stringAt(i));
            }
            for (int i = 0; i < getNCols(); i++)
            {
                string   name = cols.stringAt(i);
                JDFColor c    = cp.getCreateColorWithName(name, null);
                if (i == 0)
                {
                    c.setCMYK(new JDFCMYKColor(1, 0, 0, 0));
                }
                if (i == 1)
                {
                    c.setCMYK(new JDFCMYKColor(0, 1, 0, 0));
                }
                if (i == 2)
                {
                    c.setCMYK(new JDFCMYKColor(0, 0, 1, 0));
                }
                if (i == 3)
                {
                    c.setCMYK(new JDFCMYKColor(0, 0, 0, 1));
                }
            }
            cc.setProcessColorModel("DeviceCMYK");
            if (nCols[0] != nCols[1])
            {
                for (int ii = 0; ii < 2; ii++)
                {
                    JDFColorantControl ccP   = (JDFColorantControl)cc.addPartition(EnumPartIDKey.Side, ii == 0 ? "Front" : "Back");
                    VString            colsP = new VString();
                    for (int iii = 0; iii < nCols[ii]; iii++)
                    {
                        colsP.Add(cols.stringAt(iii));
                    }
                    JDFSeparationList co = ccP.getCreateColorantOrder();
                    co.setSeparations(colsP);
                }
            }
            else
            {
                JDFSeparationList co = cc.getCreateColorantOrder();
                co.setSeparations(cols);
            }
        }