Package com.lowagie.text

Examples of com.lowagie.text.LwgImage.scalePercent()


            pdf417.setText(text);
            LwgDocument document = new LwgDocument(LwgPageSize.A4, 50, 50, 50, 50);
            PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("pdf417.pdf"));
            document.open();
            LwgImage img = pdf417.getImage();
            img.scalePercent(50, 50 * pdf417.getYHeight());
            document.add(img);
            document.close();
        }
        catch (Exception e) {
            e.printStackTrace();
View Full Code Here


            LwgImage jpg1 = LwgImage.getInstance("otsoe.jpg");
            jpg1.scaleAbsolute(160, 120);
            document.add(new Paragraph("scaleAbsolute(160, 120)"));
            document.add(jpg1);
            LwgImage jpg2 = LwgImage.getInstance("otsoe.jpg");
            jpg2.scalePercent(50);
            document.add(new Paragraph("scalePercent(50)"));
            document.add(jpg2);
            LwgImage jpg3 = LwgImage.getInstance("otsoe.jpg");
            jpg3.scaleAbsolute(320, 120);
            document.add(new Paragraph("scaleAbsolute(320, 120)"));
View Full Code Here

            LwgImage jpg3 = LwgImage.getInstance("otsoe.jpg");
            jpg3.scaleAbsolute(320, 120);
            document.add(new Paragraph("scaleAbsolute(320, 120)"));
            document.add(jpg3);
            LwgImage jpg4 = LwgImage.getInstance("otsoe.jpg");
            jpg4.scalePercent(100, 50);
            document.add(new Paragraph("scalePercent(100, 50)"));
            document.add(jpg4);
        }
        catch(DocumentException de) {
            System.err.println(de.getMessage());
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.