Package org.apache.pdfbox.pdmodel.interactive.annotation

Examples of org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceStream


                {
                    appearanceName = "default";
                }
                Map appearanceMap = appearDictionary.getNormalAppearance();
                if (appearanceMap != null) {
                    PDAppearanceStream appearance =
                        (PDAppearanceStream)appearanceMap.get( appearanceName );
                    if( appearance != null )
                    {
                        g.translate( (int)rect.getLowerLeftX(), (int)-rect.getLowerLeftY() );
                        processSubStream( page, appearance.getResources(), appearance.getStream() );
                        g.translate( (int)-rect.getLowerLeftX(), (int)+rect.getLowerLeftY() );
                    }
                }
            }
        }
View Full Code Here


            acroFormDict.setItem(COSName.DR, null);
            // Set empty Appearance-Dictionary
            PDAppearanceDictionary ap = new PDAppearanceDictionary();
            COSStream apsStream = getDocument().createCOSStream();
            apsStream.createUnfilteredStream();
            PDAppearanceStream aps = new PDAppearanceStream(apsStream);
            COSDictionary cosObject = (COSDictionary)aps.getCOSObject();
            cosObject.setItem(COSName.SUBTYPE, COSName.FORM);
            cosObject.setItem(COSName.BBOX, new PDRectangle());
           
            ap.setNormalAppearance(aps);
            ap.getDictionary().setDirect(true);
View Full Code Here

                    appearanceName = "default";
                }
                Map<String, PDAppearanceStream> appearanceMap = appearDictionary.getNormalAppearance();
                if (appearanceMap != null)
                {
                    PDAppearanceStream appearance =
                        (PDAppearanceStream)appearanceMap.get( appearanceName );
                    if( appearance != null )
                    {
                        Point2D point = new Point2D.Float(rect.getLowerLeftX(), rect.getLowerLeftY());
                        Matrix matrix = appearance.getMatrix();
                        if (matrix != null)
                        {
                            // transform the rectangle using the given matrix
                            AffineTransform at = matrix.createAffineTransform();
                            at.transform(point, point);
                        }
                        g.translate( (int)point.getX(), -(int)point.getY() );
                        processSubStream( page, appearance.getResources(), appearance.getStream() );
                        g.translate( -(int)point.getX(), (int)point.getY() );
                    }
                }
            }
        }
View Full Code Here

                if( appearanceName == null )
                {
                    appearanceName = "default";
                }
                Map appearanceMap = appearDictionary.getNormalAppearance();
                PDAppearanceStream appearance =
                    (PDAppearanceStream)appearanceMap.get( appearanceName );
                if( appearance != null )
                {
                    g.translate( (int)rect.getLowerLeftX(), (int)-rect.getLowerLeftY()  );
                    processSubStream( page, appearance.getResources(), appearance.getStream() );
                    g.translate( (int)-rect.getLowerLeftX(), (int)+rect.getLowerLeftY()  );
                }
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.pdfbox.pdmodel.interactive.annotation.PDAppearanceStream

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.