Examples of PDRectangle


Examples of org.pdfbox.pdmodel.common.PDRectangle

     *
     * @return The ArtBox attribute.
     */
    public PDRectangle getArtBox()
    {
        PDRectangle retval = null;
        COSArray array = (COSArray)page.getDictionaryObject( COSName.ART_BOX );
        if( array != null )
        {
            retval = new PDRectangle( array );
        }
        else
        {
            retval = findCropBox();
        }
View Full Code Here

Examples of org.pdfbox.pdmodel.common.PDRectangle

     */
    public BufferedImage convertToImage() throws IOException
    {
        int scaling = 2;
        int rotation = findRotation();
        PDRectangle mBox = findMediaBox();
        int width = (int)(mBox.getWidth());//*2);
        int height = (int)(mBox.getHeight());//*2);
        if( rotation == 90 || rotation == 270 )
        {
            int tmp = width;
            width = height;
            height = tmp;
View Full Code Here

Examples of org.pdfbox.pdmodel.common.PDRectangle

    {
        int retval = Printable.PAGE_EXISTS;
        try
        {
            PageDrawer drawer = new PageDrawer();
            PDRectangle pageSize = findMediaBox();
            drawer.drawPage( graphics, this, pageSize.createDimension() );
        }
        catch( IOException io )
        {
            throw new PrinterIOException( io );
        }
View Full Code Here

Examples of org.pdfbox.pdmodel.common.PDRectangle

     *
     * @return The MediaBox at this level in the hierarchy.
     */
    public PDRectangle getMediaBox()
    {
        PDRectangle retval = null;
        COSArray array = (COSArray)page.getDictionaryObject( COSName.MEDIA_BOX );
        if( array != null )
        {
            retval = new PDRectangle( array );
        }
        return retval;
    }
View Full Code Here

Examples of org.pdfbox.pdmodel.common.PDRectangle

     *
     * @return The MediaBox at this level in the hierarchy.
     */
    public PDRectangle findMediaBox()
    {
        PDRectangle retval = getMediaBox();
        PDPageNode parent = getParent();
        if( retval == null && parent != null )
        {
            retval = parent.findMediaBox();
        }
View Full Code Here

Examples of org.pdfbox.pdmodel.common.PDRectangle

     *
     * @return The CropBox at this level in the hierarchy.
     */
    public PDRectangle getCropBox()
    {
        PDRectangle retval = null;
        COSArray array = (COSArray)page.getDictionaryObject( COSName.CROP_BOX );
        if( array != null )
        {
            retval = new PDRectangle( array );
        }
        return retval;
    }
View Full Code Here

Examples of org.pdfbox.pdmodel.common.PDRectangle

     *
     * @return The CropBox at this level in the hierarchy.
     */
    public PDRectangle findCropBox()
    {
        PDRectangle retval = getCropBox();
        PDPageNode parent = getParent();
        if( retval == null && parent != null )
        {
            retval = findParentCropBox( parent );
        }
View Full Code Here

Examples of org.pdfbox.pdmodel.common.PDRectangle

     *
     * @param node The node
     */
    private PDRectangle findParentCropBox( PDPageNode node )
    {
        PDRectangle rect = node.getCropBox();
        PDPageNode parent = node.getParent();
        if( rect == null && parent != null )
        {
            rect = findParentCropBox( node );
        }
View Full Code Here

Examples of org.pdfbox.pdmodel.common.PDRectangle

     * @return The fonts bouding box.
     */
    public PDRectangle getFontBoundingBox()
    {
        COSArray rect = (COSArray)dic.getDictionaryObject( COSName.getPDFName( "FontBBox" ) );
        PDRectangle retval = null;
        if( rect != null )
        {
            retval = new PDRectangle( rect );
        }
        return retval;
    }
View Full Code Here

Examples of org.pdfbox.pdmodel.common.PDRectangle

        // set the values
        setBaseFont(metric.getFontName());
        fd.setFontName(metric.getFontName());
        fd.setFontFamily(metric.getFamilyName());
        fd.setNonSymbolic(true);
        fd.setFontBoundingBox(new PDRectangle(metric.getFontBBox()));
        fd.setItalicAngle(metric.getItalicAngle());
        fd.setAscent(metric.getAscender());
        fd.setDescent(metric.getDescender());
        fd.setCapHeight(metric.getCapHeight());
        fd.setXHeight(metric.getXHeight());
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.