Package org.pdfbox.cos

Examples of org.pdfbox.cos.COSDictionary


     *
     * @throws IOException If there is an error creating the action.
     */
    public PDAction getAction() throws IOException
    {
        COSDictionary action = (COSDictionary)
            getDictionary().getDictionaryObject( COSName.A );
        return PDActionFactory.createAction( action );
    }
View Full Code Here


     *
     * @return The actions of the field.
     */
    public PDAdditionalActions getActions()
    {
        COSDictionary aa = (COSDictionary)dictionary.getDictionaryObject( "AA" );
        PDAdditionalActions retval = null;
        if( aa != null )
        {
            retval = new PDAdditionalActions( aa );
        }
View Full Code Here

     *
     * @return the border style dictionary.
     */
    public PDBorderStyleDictionary getBoderStyle()
    {
        COSDictionary bs = (COSDictionary) getDictionary().getItem(
                COSName.getPDFName( "BS" ) );
        if (bs != null)
        {
            return new PDBorderStyleDictionary( bs );
        }
View Full Code Here

     * Constructor.
     */
    public PDCalRGB()
    {
        array = new COSArray();
        dictionary = new COSDictionary();
        array.add( COSName.getPDFName( NAME ) );
        array.add( dictionary );
    }
View Full Code Here

     *
     * @return the popup annotation.
     */
    public PDAnnotationPopup getPopup()
    {
        COSDictionary popup = (COSDictionary) getDictionary().getDictionaryObject( "Popup" );
        if (popup != null)
        {
            return new PDAnnotationPopup( popup );
        }
        else
View Full Code Here

    /**
     * Constructor.
     */
    public PDAppearanceDictionary()
    {
        dictionary = new COSDictionary();
        //the N entry is required.
        dictionary.setItem( COSName.getPDFName( "N" ), new COSDictionary() );
    }
View Full Code Here

    {
        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 );
        }
        COSDictionary map = (COSDictionary)ap;
        Map actuals = new HashMap();
        Map retval = new COSDictionaryMap( actuals, map );
        Iterator asNames = map.keyList().iterator();
        while( asNames.hasNext() )
        {
            COSName asName = (COSName)asNames.next();
            COSStream as = (COSStream)map.getDictionaryObject( asName );
            actuals.put( asName.getName(), new PDAppearanceStream( as ) );
        }

        return retval;
    }
View Full Code Here

        }
        else
        {
            if( ap instanceof COSStream )
            {
                ap = new COSDictionary();
                ((COSDictionary)ap).setItem(COSName.getPDFName( "default" ), ap );
            }
            COSDictionary map = (COSDictionary)ap;
            Map actuals = new HashMap();
            retval = new COSDictionaryMap( actuals, map );
            Iterator asNames = map.keyList().iterator();
            while( asNames.hasNext() )
            {
                COSName asName = (COSName)asNames.next();
                COSStream as = (COSStream)map.getDictionaryObject( asName );
                actuals.put( asName.getName(), new PDAppearanceStream( as ) );
            }
        }

        return retval;
View Full Code Here

        }
        else
        {
            if( ap instanceof COSStream )
            {
                ap = new COSDictionary();
                ((COSDictionary)ap).setItem(COSName.getPDFName( "default" ), ap );
            }
            COSDictionary map = (COSDictionary)ap;
            Map actuals = new HashMap();
            retval = new COSDictionaryMap( actuals, map );
            Iterator asNames = map.keyList().iterator();
            while( asNames.hasNext() )
            {
                COSName asName = (COSName)asNames.next();
                COSStream as = (COSStream)map.getDictionaryObject( asName );
                actuals.put( asName.getName(), new PDAppearanceStream( as ) );
            }
        }

        return retval;
View Full Code Here

        pdfDocument = destination;

        PDDocumentCatalog overlayCatalog = pdfOverlay.getDocumentCatalog();
        collectLayoutPages( overlayCatalog.getAllPages() );

        COSDictionary saveGraphicsStateDic = new COSDictionary();
        saveGraphicsStateStream = new COSStream( saveGraphicsStateDic, pdfDocument.getDocument().getScratchFile() );
        OutputStream saveStream = saveGraphicsStateStream.createUnfilteredStream();
        saveStream.write( " q\n".getBytes() );
        saveStream.flush();
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.