Package org.apache.pdfbox.pdmodel.graphics.xobject

Examples of org.apache.pdfbox.pdmodel.graphics.xobject.PDXObject


    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
    {
        COSName name = (COSName) arguments.get( 0 );

        Map xobjects = context.getXObjects();
        PDXObject xobject = (PDXObject) xobjects.get(name.getName());

        if(xobject instanceof PDXObjectForm)
        {
            PDXObjectForm form = (PDXObjectForm)xobject;
            COSStream invoke = (COSStream)form.getCOSObject();
View Full Code Here


        PDPage page = drawer.getPage();
        Dimension pageSize = drawer.getPageSize();
        Graphics2D graphics = drawer.getGraphics();
        COSName objectName = (COSName)arguments.get( 0 );
        Map xobjects = drawer.getResources().getXObjects();
        PDXObject xobject = (PDXObject)xobjects.get( objectName.getName() );
        if( xobject instanceof PDXObjectImage )
        {
            PDXObjectImage image = (PDXObjectImage)xobject;
            try
            {
View Full Code Here

    public void process(PDFOperator operator, List<COSBase> arguments) throws IOException
    {
        COSName name = (COSName) arguments.get( 0 );

        Map<String,PDXObject> xobjects = context.getXObjects();
        PDXObject xobject = (PDXObject) xobjects.get(name.getName());
        if (context instanceof PDFMarkedContentExtractor)
        {
            ((PDFMarkedContentExtractor) context).xobject(xobject);
        }
View Full Code Here

    {
        PageDrawer drawer = (PageDrawer)context;
        PDPage page = drawer.getPage();
        COSName objectName = (COSName)arguments.get( 0 );
        Map<String, PDXObject> xobjects = drawer.getResources().getXObjects();
        PDXObject xobject = (PDXObject)xobjects.get( objectName.getName() );
        if ( xobject == null )
        {
            LOG.warn("Can't find the XObject for '"+objectName.getName()+"'");
        }
        else if( xobject instanceof PDXObjectImage )
View Full Code Here

            {
                if (thumbBase instanceof COSObject)
                {
                    thumbBase = ((COSObject) thumbBase).getObject();
                }
                PDXObject thumbImg = PDXObjectImage.createThumbnailXObject(thumbBase);
                ContextHelper.validateElement(context, thumbImg, GRAPHIC_PROCESS);
            }
            catch (IOException e)
            {
                context.addValidationError(new ValidationError(ERROR_GRAPHIC_INVALID, "Unable to read Thumb image : "
View Full Code Here

                if (xobj != null && COSUtils.isStream(xobj, cosDocument))
                {
                    try
                    {
                        COSStream stream = COSUtils.getAsStream(xobj, cosDocument);
                        PDXObject pdXObject = PDXObject.createXObject(stream);
                        if (pdXObject != null)
                        {
                            ContextHelper.validateElement(context, pdXObject, GRAPHIC_PROCESS);
                        }
                        else
View Full Code Here

        {
            return null;
        }
        try
        {
            PDXObject xobject = PDXObject.createXObject(obj);
            if (xobject != null)
            {
                return xobject;
            }
            COSDictionary objDictionary  = (COSDictionary)obj;
View Full Code Here

            else
            {
                xobjects = new HashMap<String, PDXObject>();
                for (COSName objName : xobjectsDictionary.keySet())
                {
                    PDXObject xobject = null;
                    try
                    {
                        xobject = PDXObject.createXObject(xobjectsDictionary.getDictionaryObject(objName));
                    }
                    catch (IOException exception)
View Full Code Here

        {
            Map<String, PDXObject> allXObjects = getXObjects();
            images = new HashMap<String, PDXObjectImage>();
            for (Map.Entry<String, PDXObject> entry : allXObjects.entrySet())
            {
                PDXObject xobject = entry.getValue();
                if (xobject instanceof PDXObjectImage)
                {
                    images.put(entry.getKey(), (PDXObjectImage) xobject);
                }
            }
View Full Code Here

        {
            Iterator<String> xobjectIter = xobjects.keySet().iterator();
            while( xobjectIter.hasNext() )
            {
                String key = xobjectIter.next();
                PDXObject xobject = xobjects.get( key );
                if (xobject instanceof PDXObjectForm)
                {
                    PDXObjectForm xObjectForm = (PDXObjectForm)xobject;
                    PDResources formResources = xObjectForm.getResources();
                    processResources(formResources, prefix, addKey);
View Full Code Here

TOP

Related Classes of org.apache.pdfbox.pdmodel.graphics.xobject.PDXObject

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.