Package org.pdfbox.cos

Examples of org.pdfbox.cos.COSDictionary


     *
     * @param macResFork The mac ResFork.
     */
    public void setMacResFork( String macResFork )
    {
        COSDictionary params = (COSDictionary)getStream().getDictionaryObject( "Params" );
        if( params == null && macResFork != null )
        {
            params = new COSDictionary();
            getStream().setItem( "Params", params );
        }
        if( params != null )
        {
            params.setEmbeddedString( "Mac", "ResFork", macResFork);
        }
    }
View Full Code Here


     * @return A proper COSDictionary
     */
    public static COSDictionary convert( Map someMap )
    {
        Iterator iter = someMap.keySet().iterator();
        COSDictionary dic = new COSDictionary();
        while( iter.hasNext() )
        {
            String name = (String)iter.next();
            COSObjectable object = (COSObjectable)someMap.get( name );
            dic.setItem( COSName.getPDFName( name ), object.getCOSObject() );
        }
        return dic;
    }
View Full Code Here

     *
     * @param array The array of COSStreams to concatenate together.
     */
    public COSStreamArray( COSArray array )
    {
        super( new COSDictionary(), null );
        streams = array;
        if( array.size() > 0 )
        {
            firstStream = (COSStream)array.getObject( 0 );
        }
View Full Code Here

        {
            function = ((COSObject)function).getCOSObject();
        }
        if( function instanceof COSDictionary )
        {
            COSDictionary funcDic = (COSDictionary)function;
            int functionType =  funcDic.getInt( "FunctionType" );
            if( function instanceof COSStream )
            {
                if( functionType == 0 )
                {
                    retval = new PDFunctionType0(new PDStream((COSStream)function));
View Full Code Here

    /**
     * Default Constructor.
     */
    public PDComplexFileSpecification()
    {
        fs = new COSDictionary();
        fs.setName( "Type", "Filespec" );
    }
View Full Code Here

     *
     * @param file The file to be embedded.
     */
    public void setEmbeddedFile( PDEmbeddedFile file )
    {
        COSDictionary ef = (COSDictionary)fs.getDictionaryObject( "EF" );
        if( ef == null && file != null )
        {
            ef = new COSDictionary();
            fs.setItem( "EF", ef );
        }
        if( ef != null )
        {
            ef.setItem( "F", file );
        }
    }
View Full Code Here

     *
     * @param file The dos file to be embedded.
     */
    public void setEmbeddedFileDos( PDEmbeddedFile file )
    {
        COSDictionary ef = (COSDictionary)fs.getDictionaryObject( "DOS" );
        if( ef == null && file != null )
        {
            ef = new COSDictionary();
            fs.setItem( "EF", ef );
        }
        if( ef != null )
        {
            ef.setItem( "DOS", file );
        }
    }
View Full Code Here

     *
     * @param file The Mac file to be embedded.
     */
    public void setEmbeddedFileMac( PDEmbeddedFile file )
    {
        COSDictionary ef = (COSDictionary)fs.getDictionaryObject( "Mac" );
        if( ef == null && file != null )
        {
            ef = new COSDictionary();
            fs.setItem( "EF", ef );
        }
        if( ef != null )
        {
            ef.setItem( "Mac", file );
        }
    }
View Full Code Here

     *
     * @param file The Unix file to be embedded.
     */
    public void setEmbeddedFileUnix( PDEmbeddedFile file )
    {
        COSDictionary ef = (COSDictionary)fs.getDictionaryObject( "Unix" );
        if( ef == null && file != null )
        {
            ef = new COSDictionary();
            fs.setItem( "EF", ef );
        }
        if( ef != null )
        {
            ef.setItem( "Unix", file );
        }
    }
View Full Code Here

    /**
     * Constructor.
     */
    public ImageParameters()
    {
        dictionary = new COSDictionary();
    }
View Full Code Here

TOP

Related Classes of org.pdfbox.cos.COSDictionary

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.