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

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


    public PDXObjectForm getAlternateIcon()
    {
        COSBase i = this.getDictionary().getDictionaryObject("IX");
        if (i instanceof COSStream)
        {
            return new PDXObjectForm((COSStream) i);
        }
        return null;
    }
View Full Code Here


        PDDocument targetDoc = PDDocument.load(mainPDF);
        PDDocument overlay1Doc = PDDocument.load(overlay1);
        try
        {
            LayerUtility layerUtil = new LayerUtility(targetDoc);
            PDXObjectForm form = layerUtil.importPageAsForm(overlay1Doc, 0);
            PDDocumentCatalog catalog = targetDoc.getDocumentCatalog();
            PDPage targetPage = (PDPage)catalog.getAllPages().get(0);
            layerUtil.wrapInSaveRestore(targetPage);
            AffineTransform at = new AffineTransform();
            PDOptionalContentGroup ocg = layerUtil.appendFormAsLayer(
View Full Code Here

                log.error(e, e);
            }
        }
        else if(xobject instanceof PDXObjectForm)
        {
            PDXObjectForm form = (PDXObjectForm)xobject;
            COSStream invoke = (COSStream)form.getCOSObject();
            PDResources pdResources = form.getResources();
            if(pdResources == null)
            {
                pdResources = page.findResources();
            }
View Full Code Here

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

        if(xobject instanceof PDXObjectForm)
        {
            PDXObjectForm form = (PDXObjectForm)xobject;
            COSStream invoke = (COSStream)form.getCOSObject();
            PDResources pdResources = form.getResources();
            PDPage page = context.getCurrentPage();
            if(pdResources == null)
            {
                pdResources = page.findResources();
            }
View Full Code Here

      } else if (xobject instanceof PDXObjectForm) {
        // save the graphics state
        getGraphicsStack().push((PDGraphicsState) getGraphicsState().clone());
        PDPage page = getCurrentPage();

        PDXObjectForm form = (PDXObjectForm) xobject;
        COSStream invoke = (COSStream) form.getCOSObject();
        PDResources pdResources = form.getResources();
        if (pdResources == null) {
          pdResources = page.findResources();
        }
        // if there is an optional form matrix, we have to
        // map the form space to the user space
        Matrix matrix = form.getMatrix();
        if (matrix != null) {
          Matrix xobjectCTM = matrix.multiply(getGraphicsState().getCurrentTransformationMatrix());
          getGraphicsState().setCurrentTransformationMatrix(xobjectCTM);
        }
        processSubStream(page, pdResources, invoke);
View Full Code Here

                log.error(e, e);
            }
        }
        else if(xobject instanceof PDXObjectForm)
        {
            PDXObjectForm form = (PDXObjectForm)xobject;
            COSStream invoke = (COSStream)form.getCOSObject();
            PDResources pdResources = form.getResources();
            if(pdResources == null)
            {
                pdResources = page.findResources();
            }
            // if there is an optional form matrix, we have to
            // map the form space to the user space
            Matrix matrix = form.getMatrix();
            if (matrix != null)
            {
                Matrix xobjectCTM = matrix.multiply( context.getGraphicsState().getCurrentTransformationMatrix());
                context.getGraphicsState().setCurrentTransformationMatrix(xobjectCTM);
            }
View Full Code Here

TOP

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

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.