Package com.jagpdf

Examples of com.jagpdf.Document.page()


    static void strings(String[] args)
    {
        Document doc = jagpdf.create_file(args[0] + "/jagpdf_doc_java_strings.pdf");
        doc.page_start(597.6, 848.68);
        Canvas canvas = doc.page().canvas();

        //[java_example_string
        /*` An example should make it clear. Let's load a standard ISO-8859-2
            encoded font. */
        Font helv = doc.font_load("standard; enc=iso-8859-2; name=Helvetica; size=24");
View Full Code Here



    public static void main(String argv[]) {
        Document doc = jagpdf.create_file(argv[0] + "/basic_text.pdf");
        doc.page_start(597.6, 848.68);
        Canvas canvas = doc.page().canvas();
        doc.outline().item(horse);
        // 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);
View Full Code Here

public class basic_image {
    public static void main(String argv[]) {
        Document doc = jagpdf.create_file(argv[0] + "/basic_image.pdf");
        doc.page_start(597.6, 848.68);
        Canvas canvas = doc.page().canvas();
        String res_dir = testlib.getResourcesDir();
        String image_path = res_dir + "/images/lena.jpg";
        //
        // image format autodetection
        //
View Full Code Here

        jagpdf.create_profile_from_string(s_profile);

        Document doc = jagpdf.create_stream(my_stream);
        doc.page_start(5.9*72, 3.5*72);
        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);
View Full Code Here

        profile.set("info.creation_date", "0");
        profile.set("stdsh.pwd_user", "user");
        profile.set("stdsh.pwd_owner", "owner");
        Document doc = jagpdf.create_file(argv[0] + "/encrypted.pdf", profile);
        doc.page_start(597.6, 848.68);
        Canvas canvas = doc.page().canvas();
        String res_dir = testlib.getResourcesDir();
        String image_path = res_dir + "/images/lena.jpg";
        // bookmark
        doc.outline().item(horse);
        // image
View Full Code Here

        Document doc = jagpdf.create_file("hello.pdf");
        //<- */
        Document doc = jagpdf.create_file(argv[0] + "/jagpdf_doc_hello.pdf");
        //->
        doc.page_start(597.6, 848.68);
        doc.page().canvas().text(50, 800, "Hello, world!");
        doc.page_end();
        doc.finalize_doc();
    }
}
//]
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.