Package org.pdfbox.cos

Examples of org.pdfbox.cos.COSBase


        {
            names = new HashMap();
            for( int i=0; i<namesArray.size(); i+=2 )
            {
                COSString key = (COSString)namesArray.getObject(i);
                COSBase cosValue = namesArray.getObject( i+1 );
                Object pdValue = convertCOSToPD( cosValue );
               
                names.put( key.getString(), pdValue );
            }
            names = Collections.unmodifiableMap(names);
View Full Code Here


     *
     * @return The cos object that matches this Java object.
     */
    public COSBase getSecondCOSObject()
    {
        COSBase retval = null;
        if( stream != null )
        {
            retval = stream.getCOSObject();
        }
        return retval;
View Full Code Here

            Map actualMap = new HashMap();
            Iterator keyIter = map.keyList().iterator();
            while( keyIter.hasNext() )
            {
                COSName key = (COSName)keyIter.next();
                COSBase cosObj = map.getDictionaryObject( key );
                Object actualObject = null;
                if( cosObj instanceof COSString )
                {
                    actualObject = ((COSString)cosObj).getString();
                }
View Full Code Here

     *
     * @return The cos object that matches this Java object.
     */
    public COSBase getCOSObject()
    {
        COSBase retval = null;
        if( string == null )
        {
            retval = stream;
        }
        else
View Full Code Here

     * @return A list of all encoding filters to apply to this stream.
     */
    public List getFilters()
    {
        List retval = null;
        COSBase filters = stream.getFilters();
        if( filters instanceof COSName )
        {
            COSName name = (COSName)filters;
            retval = new COSArrayList( name.getName(), name, stream, "Filter" );
        }
View Full Code Here

     *
     * @param filters The filters that are part of this stream.
     */
    public void setFilters( List filters )
    {
        COSBase obj = COSArrayList.convertStringListToCOSNameCOSArray( filters );
        stream.setItem( "Filter", obj );
    }
View Full Code Here

     */
    public List getDecodeParams() throws IOException
    {
        List retval = null;
       
        COSBase dp = stream.getDictionaryObject( "DecodeParms" );
        if( dp == null )
        {
            //See PDF Ref 1.5 implementation note 7, the DP is sometimes used instead.
            dp = stream.getDictionaryObject( "DP" );
        }
View Full Code Here

     *
     * @throws IOException If there is an error creating the file spec.
     */
    public PDFileSpecification getFile() throws IOException
    {
        COSBase f = stream.getDictionaryObject( "F" );
        PDFileSpecification retval = PDFileSpecification.createFS( f );
        return retval;
    }
View Full Code Here

     * @return A list of all encoding filters to apply to this stream.
     */
    public List getFileFilters()
    {
        List retval = null;
        COSBase filters = stream.getDictionaryObject( "FFilter" );
        if( filters instanceof COSName )
        {
            COSName name = (COSName)filters;
            retval = new COSArrayList( name.getName(), name, stream, "FFilter" );
        }
View Full Code Here

     *
     * @param filters The filters that are part of this stream.
     */
    public void setFileFilters( List filters )
    {
        COSBase obj = COSArrayList.convertStringListToCOSNameCOSArray( filters );
        stream.setItem( "FFilter", obj );
    }
View Full Code Here

TOP

Related Classes of org.pdfbox.cos.COSBase

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.