Package org.pdfbox.pdmodel.graphics.xobject

Examples of org.pdfbox.pdmodel.graphics.xobject.PDXObjectImage


            doc = new PDDocument();
           
            PDPage page = new PDPage();
            doc.addPage( page );
           
            PDXObjectImage ximage = null;
            if( image.toLowerCase().endsWith( ".jpg" ) )
            {
                ximage = new PDJpeg(doc, new FileInputStream( image ) );
            }
            else if (image.toLowerCase().endsWith(".tif") || image.toLowerCase().endsWith(".tiff"))
View Full Code Here


        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
            {
                BufferedImage awtImage = image.getRGBImage();
                Matrix ctm = drawer.getGraphicsState().getCurrentTransformationMatrix();
               
                int width = awtImage.getWidth();
                int height = awtImage.getHeight();
View Full Code Here

            COSStream image = (COSStream)(images.getDictionaryObject(imageName));
           
            COSName subType =(COSName)image.getDictionaryObject(COSName.SUBTYPE);
            if( subType.equals(COSName.IMAGE) )
            {
                PDXObjectImage ximage = (PDXObjectImage)PDXObject.createXObject( image );
                if( ximage !=null )
                {    
                    actuals.put( imageName.getName(), ximage);
                }
            }
View Full Code Here

                        {
                            Iterator imageIter = images.keySet().iterator();
                            while( imageIter.hasNext() )
                            {
                                String key = (String)imageIter.next();
                                PDXObjectImage image = (PDXObjectImage)images.get( key );
                                String name = getUniqueFileName( key, image.getSuffix() );
                                System.out.println( "Writing image:" + name );
                                image.write2file( name );
                            }
                        }
                    }
                }
                finally
View Full Code Here

TOP

Related Classes of org.pdfbox.pdmodel.graphics.xobject.PDXObjectImage

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.