Package org.apache.pdfbox.cos

Examples of org.apache.pdfbox.cos.COSDictionary


     * @return a default font
     * @throws IOException if something goes wrong
     */
    public static PDFont createDefaultFont() throws IOException
    {
        COSDictionary dict = new COSDictionary();
        dict.setItem(COSName.TYPE, COSName.FONT);
        dict.setItem (COSName.SUBTYPE, COSName.TRUE_TYPE);
        dict.setString(COSName.BASE_FONT, "Arial");
        return createFont(dict);
    }
View Full Code Here


    /**
     * Default constructor.
     */
    public PDAdditionalActions()
    {
        actions = new COSDictionary();
    }
View Full Code Here

    /**
     * Default constructor.
     */
    public FDFAnnotation()
    {
        annot = new COSDictionary();
        annot.setItem( COSName.TYPE, COSName.ANNOT );
    }
View Full Code Here

    /**
     * Default constructor.
     */
    public PDWindowsLaunchParams()
    {
        params = new COSDictionary();
    }
View Full Code Here

    @Override
    public final DecodeResult decode(InputStream encoded, OutputStream decoded,
                                         COSDictionary parameters, int index) throws IOException
    {
        ImageReader reader = findImageReader("JBIG2", "jbig2-imageio is not installed");
        DecodeResult result = new DecodeResult(new COSDictionary());
        result.getParameters().addAll(parameters);

        COSInteger bits = (COSInteger) parameters.getDictionaryObject(COSName.BITS_PER_COMPONENT);
        COSDictionary params = (COSDictionary) parameters.getDictionaryObject(COSName.DECODE_PARMS);

        COSStream globals = null;
        if (params != null)
        {
            globals = (COSStream) params.getDictionaryObject(COSName.JBIG2_GLOBALS);
        }

        ImageInputStream iis = null;
        try
        {
View Full Code Here

     *
     * @param mediaBox The MediaBox of the page.
     */
    public PDPage(PDRectangle mediaBox)
    {
        page = new COSDictionary();
        page.setItem(COSName.TYPE, COSName.PAGE);
        page.setItem(COSName.MEDIA_BOX, mediaBox);
    }
View Full Code Here

    @Override
    public PDResources getResources()
    {
        if (pageResources == null)
        {
            COSDictionary resources = (COSDictionary)
                    PDPageTree.getInheritableAttribute(page, COSName.RESOURCES);

            // note: it's an error for resources to not be present
            if (resources != null)
            {
View Full Code Here

        if (dap == null)
        {
            COSArray kids = (COSArray) parent.getDictionary().getDictionaryObject(COSName.KIDS);
            if (kids != null && kids.size() > 0)
            {
                COSDictionary firstKid = (COSDictionary) kids.getObject(0);
                dap = (COSString) firstKid.getDictionaryObject(COSName.DA);
            }
            if (dap == null)
            {
                dap = (COSString) acroForm.getDictionary().getDictionaryObject(COSName.DA);
            }
View Full Code Here

            beads = new COSArray();
        }
        List<PDThreadBead> pdObjects = new ArrayList<PDThreadBead>();
        for (int i = 0; i < beads.size(); i++)
        {
            COSDictionary beadDic = (COSDictionary) beads.getObject(i);
            PDThreadBead bead = null;
            // in some cases the bead is null
            if (beadDic != null)
            {
                bead = new PDThreadBead(beadDic);
View Full Code Here

        if (parent.getDictionary().getDictionaryObject(COSName.Q) == null)
        {
            COSArray kids = (COSArray) parent.getDictionary().getDictionaryObject(COSName.KIDS);
            if (kids != null && kids.size() > 0)
            {
                COSDictionary firstKid = (COSDictionary) kids.getObject(0);
                COSNumber qNum = (COSNumber) firstKid.getDictionaryObject(COSName.Q);
                if (qNum != null)
                {
                    q = qNum.intValue();
                }
            }
View Full Code Here

TOP

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