Examples of PDJpeg


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

        logger.info("ProcSet array has been created");
    }

    public void createSignatureImage(PDDocument template, InputStream inputStream) throws IOException
    {
        PDJpeg img = new PDJpeg(template, inputStream);
        pdfStructure.setJpedImage(img);
        logger.info("Visible Signature Image has been created");
        // pdfStructure.setTemplate(template);
        inputStream.close();
View Full Code Here

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

                    // create a PDXObjectImage with the given image file
                    String imageFilename = args[2];
                    PDXObjectImage ximage;
                    if (imageFilename.toLowerCase().endsWith(".jpg"))
                    {
                        ximage = new PDJpeg(document, new FileInputStream(imageFilename));
                    }
                    else if (imageFilename.toLowerCase().endsWith(".tif") || imageFilename.toLowerCase().endsWith(".tiff"))
                    {
                        ximage = new PDCcitt(document, new RandomAccessFile(new File(imageFilename), "r"));
                    }
View Full Code Here

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

            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"))
            {
                ximage = new PDCcitt(doc, new RandomAccessFile(new File(image),"r"));
            }
View Full Code Here

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

            PDPage page = (PDPage)doc.getDocumentCatalog().getAllPages().get( 0 );

            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"))
            {
                ximage = new PDCcitt(doc, new RandomAccessFile(new File(image),"r"));
            }
View Full Code Here

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

        PDRectangle pdRect = new PDRectangle( w + inset, h + inset );
        PDPage page = new PDPage();
        page.setMediaBox( pdRect );
        doc.addPage( page );

        PDJpeg xImage = new PDJpeg( doc, img );

        PDPageContentStream contentStream = new PDPageContentStream( doc, page );
        contentStream.drawImage( xImage, ( pdRect.getWidth() - w ) / 2, ( pdRect.getHeight() - h ) / 2 );
        contentStream.close();
    }
View Full Code Here

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

                    rubberStamp.setRectangle(new PDRectangle(100,100));
                    rubberStamp.setContents("A top secret note");

                    // Create a PDXObjectImage with the given jpg
                    FileInputStream fin = new FileInputStream( args[2] );
                    PDJpeg mypic = new PDJpeg(document,fin);
                   
                    //Define and set the target rectangle
                    PDRectangle myrect = new PDRectangle();
                    myrect.setUpperRightX(275);
                    myrect.setUpperRightY(575);
View Full Code Here

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

            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"))
            {
                ximage = new PDCcitt(doc, new RandomAccessFile(new File(image),"r"));
            }
View Full Code Here

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

            PDPage page = (PDPage)doc.getDocumentCatalog().getAllPages().get( 0 );

            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"))
            {
                ximage = new PDCcitt(doc, new RandomAccessFile(new File(image),"r"));
            }
View Full Code Here

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

            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"))
            {
                ximage = new PDCcitt(doc, new RandomAccessFile(new File(image),"r"));
            }
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.