예제 #1
0
        private void setupRunList(int type)
        {
            JDFIntegerRangeList pageRange = new JDFIntegerRangeList(new JDFIntegerRange(0, -1, 16));

            rlIn.setPartUsage(EnumPartUsage.Sparse);
            rlIn.setDescriptiveName("Explicitly partitioned by LayerIDs to enable layer selextion in the link");
            JDFRunList rlAll = (JDFRunList)rlIn.addPartition(EnumPartIDKey.LayerIDs, "0");

            rlAll.setFileURL("background.pdf");
            rlAll.setPages(pageRange);

            JDFRunList rlLanguage = (JDFRunList)rlIn.addPartition(EnumPartIDKey.LayerIDs, "1");
            JDFRunList rlEn       = (JDFRunList)rlLanguage.addPartition(EnumPartIDKey.PartVersion, "FR");

            rlEn.setFileURL("francais.pdf");
            rlEn.setPages(pageRange);
            rlEn.setLogicalPage(16);

            JDFRunList rlDe = (JDFRunList)rlLanguage.addPartition(EnumPartIDKey.PartVersion, "De");

            rlDe.setFileURL("deutsch.pdf");
            rlDe.setPages(pageRange);
            rlDe.setLogicalPage(16);

            if (type == 1)
            {
                JDFRunList rlCurrency = (JDFRunList)rlIn.addPartition(EnumPartIDKey.LayerIDs, "2");
                JDFRunList rlEur      = (JDFRunList)rlCurrency.addPartition(EnumPartIDKey.PartVersion, "Euro");
                rlEur.setFileURL("€.pdf");
                rlEur.setPages(pageRange);
                rlEur.setLogicalPage(32);
                JDFRunList rlCHF = (JDFRunList)rlCurrency.addPartition(EnumPartIDKey.PartVersion, "CHF");
                rlCHF.setFileURL("Fränkli.pdf");
                rlCHF.setPages(pageRange);
                rlCHF.setLogicalPage(32);
            }
            else if (type == 2)
            {
                JDFRunList rlCurrency = (JDFRunList)rlIn.addPartition(EnumPartIDKey.LayerIDs, "2");
                JDFRunList rlEur      = (JDFRunList)rlCurrency.addPartition(EnumPartIDKey.PartVersion, "De");
                rlEur.setFileURL("€.pdf");
                rlEur.setPages(pageRange);
                rlEur.setLogicalPage(32);

                JDFRunList rlEur2 = (JDFRunList)rlCurrency.addPartition(EnumPartIDKey.PartVersion, "Fr");
                rlEur2.setIdentical(rlEur);

                JDFRunList rlCHF = (JDFRunList)rlCurrency.addPartition(EnumPartIDKey.PartVersion, "Ch");
                rlCHF.setFileURL("Fränkli.pdf");
                rlCHF.setPages(pageRange);
                rlCHF.setLogicalPage(32);

                JDFRunList rlCh = (JDFRunList)rlLanguage.addPartition(EnumPartIDKey.PartVersion, "Ch");
                rlCh.setIdentical(rlDe);
            }
        }
예제 #2
0
        public virtual void testLayerRunList()
        {
            JDFElement.setLongID(false);
            setUpDoc();
            JDFIntegerRangeList pageRange = new JDFIntegerRangeList(new JDFIntegerRange(0, -1, 16));

            rlIn.setDescriptiveName("Layers are just another partversion layer selection in the link is achieved using multiple partversions");

            JDFRunList rlAll = (JDFRunList)rlIn.addPartition(EnumPartIDKey.PartVersion, "CMYK");

            rlAll.setFileURL("background.pdf");
            rlAll.setPages(pageRange);

            JDFRunList rlEn = (JDFRunList)rlIn.addPartition(EnumPartIDKey.PartVersion, "FR");

            rlEn.setFileURL("Francais.pdf");
            rlEn.setPages(pageRange);
            rlEn.setLogicalPage(16);

            JDFRunList rlDe = (JDFRunList)rlIn.addPartition(EnumPartIDKey.PartVersion, "De");

            rlDe.setFileURL("deutsch.pdf");
            rlDe.setPages(pageRange);
            rlDe.setLogicalPage(16);

            setupLayout(false);

            n.setPartStatus(new JDFAttributeMap(EnumPartIDKey.PartVersion, "De"), EnumNodeStatus.Completed, null);
            JDFResourceLink rl = n.getLink(rlIn, null);

            rl.setPartition(EnumPartIDKey.PartVersion, "CMYK De");
            d.write2File(sm_dirTestDataTemp + "LayerList.jdf", 2, false);
            rl.setPartition(EnumPartIDKey.PartVersion, "De");
            rl.setDescriptiveName("Only DE, no bkg partversion is selected");
            d.write2File(sm_dirTestDataTemp + "LayerList_BKG.jdf", 2, false);
        }