Package org.pdfbox.cos

Examples of org.pdfbox.cos.COSDictionary


     *
     * @return predictor algorithm code
     */
    public int getPredictor()
    {
        COSDictionary decodeParms = getDecodeParams();
        if (decodeParms != null)
        {
            int i = decodeParms.getInt("Predictor");
            if (i != -1)
            {
                return i;
            }
        }
View Full Code Here


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

    public PDCcitt( PDDocument doc, RandomAccess raf ) throws IOException
    {
        super( new PDStream(doc),"tiff");
        // super( new PDStream( doc, null, true ), "tiff" );
       
        COSDictionary decodeParms = new COSDictionary();
       
        COSDictionary dic = getCOSStream();
     
        extractFromTiff(raf, getCOSStream().createFilteredStream(),decodeParms);
       
        dic.setItem( COSName.FILTER, COSName.CCITTFAX_DECODE);
        dic.setItem( COSName.SUBTYPE, COSName.IMAGE);
        dic.setItem( COSName.TYPE, COSName.getPDFName( "XObject" ) );
        dic.setItem( "DecodeParms", decodeParms);
       
        setBitsPerComponent( 1 );
        setColorSpace( new PDDeviceGray() );
        setWidth( decodeParms.getInt("Columns") );
        setHeight( decodeParms.getInt("Rows") );
View Full Code Here

            short rows = 0;
            short blackis1 = 0;
            short comptype = 3; // T4 compression
            long t4options = 0; // Will set if 1d or 2d T4
           
            COSDictionary decodeParms = (COSDictionary) options.getDictionaryObject("DecodeParms");
           
            if (decodeParms != null)
            {
                cols = (short) decodeParms.getInt("Columns", cols);
                rows = (short) decodeParms.getInt("Rows", rows);
                if (decodeParms.getBoolean("BlackIs1", false))
                {
                    blackis1 = 1;
                }
                int k = decodeParms.getInt("K")// Mandatory parm
                if (k < 0)
                {
                    //T6
                    comptype = 4;
                }
View Full Code Here

     *
     * @param valueClass The PD Model type of object that is the value.
     */
    public PDNameTreeNode( Class valueClass )
    {
        node = new COSDictionary();
        valueType = valueClass;
    }
View Full Code Here

     * @return The mac subtype.
     */
    public String getMacSubtype()
    {
        String retval = null;
        COSDictionary params = (COSDictionary)getStream().getDictionaryObject( "Params" );
        if( params != null )
        {
            retval = params.getEmbeddedString( "Mac", "Subtype" );
        }
        return retval;
    }
View Full Code Here

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

     * @return The mac Creator.
     */
    public String getMacCreator()
    {
        String retval = null;
        COSDictionary params = (COSDictionary)getStream().getDictionaryObject( "Params" );
        if( params != null )
        {
            retval = params.getEmbeddedString( "Mac", "Creator" );
        }
        return retval;
    }
View Full Code Here

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

     * @return The mac ResFork.
     */
    public String getMacResFork()
    {
        String retval = null;
        COSDictionary params = (COSDictionary)getStream().getDictionaryObject( "Params" );
        if( params != null )
        {
            retval = params.getEmbeddedString( "Mac", "ResFork" );
        }
        return retval;
    }
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.