Package org.pdfbox.pdmodel

Examples of org.pdfbox.pdmodel.PDPage.findRotation()


            {
                try
                {
                    PDPage page = getCurrentPage();
                    Matrix ctm = getGraphicsState().getCurrentTransformationMatrix();
                    double rotationInRadians =(page.findRotation() * Math.PI)/180;
                    
                   
                    AffineTransform rotation = new AffineTransform();
                    rotation.setToRotation( rotationInRadians );
                    AffineTransform rotationInverse = rotation.createInverse();
View Full Code Here


                Matrix ctm = drawer.getGraphicsState().getCurrentTransformationMatrix();
               
                int width = awtImage.getWidth();
                int height = awtImage.getHeight();

                double rotationInRadians =(page.findRotation() * Math.PI)/180;
                
               
                AffineTransform rotation = new AffineTransform();
                rotation.setToRotation( rotationInRadians );
                AffineTransform rotationInverse = rotation.createInverse();
View Full Code Here

                Matrix scalingMatrix = Matrix.getScaleInstance(1f/width,1f/height);
                scalingParams = scalingParams.multiply( scalingMatrix );
               
                Matrix translationParams = unrotatedCTM.extractTranslating();
                Matrix translationMatrix = null;
                int pageRotation = page.findRotation();
                if( pageRotation == 0 )
                {
                    translationParams.setValue(2,1, -translationParams.getValue( 2,1 ));
                    translationMatrix = Matrix.getTranslatingInstance(
                        0, (float)pageSize.getHeight()-height*scalingParams.getYScale() );
View Full Code Here

                            //need to reposition link rectangle to match text space
                            float x = rect.getLowerLeftX();
                            float y = rect.getUpperRightY();
                            float width = rect.getWidth();
                            float height = rect.getHeight();
                            int rotation = page.findRotation();
                            if( rotation == 0 )
                            {
                                PDRectangle pageSize = page.findMediaBox();
                                y = pageSize.getHeight() - y;
                            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.