Package org.apache.pdfbox.cos

Examples of org.apache.pdfbox.cos.COSBase


    {
        if( base == null )
        {
            return null;
        }
        COSBase retval = (COSBase)clonedVersion.get( base );
        if( retval != null )
        {
            //we are done, it has already been converted.
        }
        else if( base instanceof List )
View Full Code Here


    {
        if( base == null )
        {
            return;
        }
        COSBase retval = (COSBase)clonedVersion.get( base );
        if( retval != null )
        {
          return;
          //we are done, it has already been converted. // ### Is that correct for cloneMerge???
        }
View Full Code Here

     * or action.
     */
    public PDDestinationOrAction getOpenAction() throws IOException
    {
        PDDestinationOrAction action = null;
        COSBase actionObj = root.getDictionaryObject("OpenAction");

        if( actionObj == null )
        {
            //no op
        }
View Full Code Here

     *
     * @return A list of key(java.lang.String) value(PDAppearanceStream) pairs
     */
    public Map getNormalAppearance()
    {
        COSBase ap = dictionary.getDictionaryObject( COSName.getPDFName( "N" ) );
        if( ap instanceof COSStream )
        {
            COSStream aux = (COSStream) ap;
            ap = new COSDictionary();
            ((COSDictionary)ap).setItem(COSName.getPDFName( "default" ), aux );
View Full Code Here

     * @return A list of key(java.lang.String) value(PDAppearanceStream) pairs
     */
    public Map getRolloverAppearance()
    {
        Map retval = null;
        COSBase ap = dictionary.getDictionaryObject( COSName.getPDFName( "R" ) );
        if( ap == null )
        {
            retval = getNormalAppearance();
        }
        else
View Full Code Here

     * @return A list of key(java.lang.String) value(PDAppearanceStream) pairs
     */
    public Map getDownAppearance()
    {
        Map retval = null;
        COSBase ap = dictionary.getDictionaryObject( COSName.getPDFName( "D" ) );
        if( ap == null )
        {
            retval = getNormalAppearance();
        }
        else
View Full Code Here

        }


        while( objectsToWrite.size() > 0 )
        {
            COSBase nextObject = (COSBase)objectsToWrite.remove( 0 );
            doWriteObject( nextObject );
        }


        willEncrypt = false;

        if( encrypt != null )
        {
            addObjectToWrite( encrypt );
        }

        while( objectsToWrite.size() > 0 )
        {
            COSBase nextObject = (COSBase)objectsToWrite.remove( 0 );
            doWriteObject( nextObject );
        }

        // write all objects
        /**
 
View Full Code Here

        }**/
    }

    private void addObjectToWrite( COSBase object )
    {
        COSBase actual = object;
        if( actual instanceof COSObject )
        {
            actual = ((COSObject)actual).getObject();
        }

View Full Code Here

     *
     * @return The object key for the object.
     */
    private COSObjectKey getObjectKey( COSBase obj )
    {
        COSBase actual = obj;
        if( actual instanceof COSObject )
        {
            actual = ((COSObject)obj).getObject();
        }
        COSObjectKey key = null;
View Full Code Here

        {
            int count = 0;
            getStandardOutput().write(ARRAY_OPEN);
            for (Iterator i = obj.iterator(); i.hasNext();)
            {
                COSBase current = (COSBase) i.next();
                if( current instanceof COSDictionary )
                {
                    addObjectToWrite( current );
                    writeReference( current );
                }
                else if( current instanceof COSObject )
                {
                    COSBase subValue = ((COSObject)current).getObject();
                    if( subValue instanceof COSDictionary || subValue == null )
                    {
                        addObjectToWrite( current );
                        writeReference( current );
                    }
                    else
                    {
                        subValue.accept( this );
                    }
                }
                else if( current == null )
                {
                    COSNull.NULL.accept( this );
View Full Code Here

TOP

Related Classes of org.apache.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.