Package org.pdfbox.pdmodel.common

Examples of org.pdfbox.pdmodel.common.COSStreamArray


           
            // Create a pdstream to append new content
            PDStream contentsToAppend = new PDStream( document );
           
            // This will be the resulting COSStreamArray after existing and new streams are merged
            COSStreamArray compoundStream = null;
           
            // If contents is already an array, a new stream is simply appended to it
            if(contents.getStream() instanceof COSStreamArray)
            {
                compoundStream = (COSStreamArray)contents.getStream();
                compoundStream.appendStream( contentsToAppend.getStream());
            }
            else
            {
                // Creates the COSStreamArray and adds the current stream plus a new one to it
                COSArray newArray = new COSArray();
                newArray.add(contents.getCOSObject());
                newArray.add(contentsToAppend.getCOSObject());
                compoundStream = new COSStreamArray(newArray);               
            }
           
            if( compress )
            {
                List filters = new ArrayList();
View Full Code Here

TOP

Related Classes of org.pdfbox.pdmodel.common.COSStreamArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.