Package org.apache.pdfbox.cos

Examples of org.apache.pdfbox.cos.COSBase


     * @return the signature dictionary
     *
     */
    public PDSignature getValue()
    {
        COSBase dictionary = getDictionary().getDictionaryObject(COSName.V);
        if (dictionary == null)
        {
            return null;
        }
        return new PDSignature((COSDictionary)dictionary);
View Full Code Here


        }

        COSName subType = dictionary.getCOSName(COSName.SUBTYPE);
        if (COSName.TYPE1.equals(subType))
        {
            COSBase fd = dictionary.getDictionaryObject(COSName.FONT_DESC);
            if (fd != null && fd instanceof COSDictionary)
            {
                if (((COSDictionary)fd).containsKey(COSName.FONT_FILE3))
                {
                    return new PDType1CFont(dictionary);
                }
            }
            return new PDType1Font(dictionary);
        }
        else if (COSName.MM_TYPE1.equals(subType))
        {
            COSBase fd = dictionary.getDictionaryObject(COSName.FONT_DESC);
            if (fd != null && fd instanceof COSDictionary)
            {
                if (((COSDictionary)fd).containsKey(COSName.FONT_FILE3))
                {
                    return new PDType1CFont(dictionary);
View Full Code Here

            {
                xfaBytes = new byte[1024];
                COSArray cosArray = (COSArray) this.getCOSObject();
                for (int i = 1; i < cosArray.size(); i += 2)
                {
                    COSBase cosObj = cosArray.getObject(i);
                    if (cosObj instanceof COSStream)
                    {
                        is = ((COSStream) cosObj).getUnfilteredStream();
                        int nRead = 0;
                        while ((nRead = is.read(xfaBytes, 0, xfaBytes.length)) != -1)
View Full Code Here

    }

    @Override
    public COSStream getContentStream()
    {
        COSBase base = page.getDictionaryObject(COSName.CONTENTS);
        if (base instanceof COSStream)
        {
            return (COSStream)base;
        }
        else if (base instanceof COSArray)
View Full Code Here

        else
        {
            List<PDAnnotation> actuals = new ArrayList<PDAnnotation>();
            for (int i = 0; i < annots.size(); i++)
            {
                COSBase item = annots.getObject(i);
                if (item == null)
                {
                    continue;
                }
                actuals.add(PDAnnotation.createAnnotation(item));
View Full Code Here

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

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

     */
    public List<Object> getDecodeParms() throws IOException
    {
        List<Object> retval = null;

        COSBase dp = stream.getDictionaryObject(COSName.DECODE_PARMS);
        if (dp == null)
        {
            // See PDF Ref 1.5 implementation note 7, the DP is sometimes used
            // instead.
            dp = stream.getDictionaryObject(COSName.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(COSName.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<String> getFileFilters()
    {
        List<String> retval = null;
        COSBase filters = stream.getDictionaryObject(COSName.F_FILTER);
        if (filters instanceof COSName)
        {
            COSName name = (COSName) filters;
            retval = new COSArrayList<String>(name.getName(), name, stream,
                    COSName.F_FILTER);
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.