Package com.jagpdf

Examples of com.jagpdf.Canvas.image()


        String image_path = res_dir + "/images/lena.jpg";
        //
        // image format autodetection
        //
        Image img = doc.image_load_file(image_path);
        canvas.image(img, 50, 50);
        //
        // image format specification (tests enums as well)
        //
        Image img_enum = doc.image_load_file(image_path,
                                             ImageFormat.IMAGE_FORMAT_JPEG);
View Full Code Here


        //
        // image format specification (tests enums as well)
        //
        Image img_enum = doc.image_load_file(image_path,
                                             ImageFormat.IMAGE_FORMAT_JPEG);
        canvas.image(img_enum, 310, 50);
        //
        // custom image
        //
        int img_dim = 7;
        byte[] checker_bytes = new byte[img_dim * img_dim];
 
View Full Code Here

        imgdef.color_space(ColorSpaceType.CS_DEVICE_GRAY);
        imgdef.bits_per_component(8);
        imgdef.dpi(9, 9);
        imgdef.format(ImageFormat.IMAGE_FORMAT_NATIVE);
        Image img_custom = doc.image_load(imgdef);
        canvas.image(img_custom, 50, 310);
        //
        // bad format specification (tests exceptions as well)
        //
        try
        {
View Full Code Here

        Canvas canvas = doc.page().canvas();
        // meat
        String res_dir = testlib.getResourcesDir();
        String image_path = res_dir + "/images-jpeg/PalmTree-CMYK-icc-FOGRA27.jpg";
        Image img = doc.image_load_file(image_path);
        canvas.image(img, 50, 50);
        canvas.text(10, 10,
                    "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                    "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                    "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
                    "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" +
View Full Code Here

        String image_path = res_dir + "/images/lena.jpg";
        // bookmark
        doc.outline().item(horse);
        // image
        Image img = doc.image_load_file(image_path);
        canvas.image(img, 50, 50);
        // adobe core font
        Font font_14 = doc.font_load("standard;name=Times-Roman;size=12;enc=windows-1250");
        canvas.text_font(font_14);
        canvas.text(50, 800, horse);
        // true type
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.