public void Add(Stream PdfInputStream, int[] PageNumbers)
 {
     PdfFile pf = new PdfFile(PdfInputStream);
        pf.ProgressEvent+=new ProgressDelegate(pf_ProgressEvent);
        pf.Load();
        PdfSplitter ps = new PdfSplitter();
        ps.ProgressEvent+=new ProgressDelegate(pf_ProgressEvent);
        ps.Load(pf, PageNumbers, this.number);
        this.Add(ps);
 }
Exemplo n.º 2
0
        public void Add(Stream PdfInputStream, int[] PageNumbers)
        {
            PdfFile pf = new PdfFile(PdfInputStream);

            pf.ProgressEvent += new ProgressDelegate(pf_ProgressEvent);
            pf.Load();
            PdfSplitter ps = new PdfSplitter();

            ps.ProgressEvent += new ProgressDelegate(pf_ProgressEvent);
            ps.Load(pf, PageNumbers, this.number);
            this.Add(ps);
        }
Exemplo n.º 3
0
        private void Add(PdfSplitter PdfSplitter)
        {
            foreach (int pageNumber in PdfSplitter.pageNumbers)
            {
                this.pageNumbers.Add(PdfSplitter.transHash[pageNumber]);
            }
            ArrayList sortedObjects = new ArrayList();

            foreach (PdfFileObject pfo in PdfSplitter.sObjects.Values)
            {
                sortedObjects.Add(pfo);
            }
            sortedObjects.Sort(new PdfFileObjectNumberComparer());

            foreach (PdfFileObject pfo in sortedObjects)
            {
                this.xrefs.Add(pos);
                this.pos += pfo.WriteToStream(this.target);
                this.number++;
            }
        }
        private void Add(PdfSplitter PdfSplitter)
        {
            foreach (int pageNumber in PdfSplitter.pageNumbers)
            {
                this.pageNumbers.Add(PdfSplitter.transHash[pageNumber]);
            }
            ArrayList sortedObjects = new ArrayList();
            foreach (PdfFileObject pfo in PdfSplitter.sObjects.Values)
                sortedObjects.Add(pfo);
            sortedObjects.Sort(new PdfFileObjectNumberComparer());

            foreach (PdfFileObject pfo in sortedObjects)
            {
                this.xrefs.Add(pos);
                this.pos += pfo.WriteToStream(this.target);
                this.number++;
            }
        }