Examples of font_load()


Examples of com.jagpdf.Document.font_load()

        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");
        canvas.text_font(helv);
        /*` One of the languages representable by this encoding is Czech. We can
          pass a Unicode string ['úplnÄ›k] (full moon). [lib] converts the string
          to ISO-8859-2 and it is shown correctly. */
        String full_moon_cze = "\u00fapln\u011bk";
View Full Code Here

Examples of com.jagpdf.Document.font_load()

        /* //->
        Font dejavu = doc.font_load("enc=utf-8; file=DejaVuSans.ttf; size=24");
        //<- */
        String res_dir = testlib.getResourcesDir();
        String dejavu_file = res_dir + "/fonts/DejaVuSans.ttf";
        Font dejavu = doc.font_load("enc=utf-8; file=" + dejavu_file + "; size=24");
        //->
        canvas.text_font(dejavu);
        /*` Now we can mix Czech and Swedish and it will be shown correctly as
            [lib] converts the strings to UTF-8.*/
        canvas.text(50, 720, full_moon_swe);
View Full Code Here

Examples of com.jagpdf.Document.font_load()

        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);
        // true type
        String res_dir = testlib.getResourcesDir();
        String fspec = "enc=utf-8; size=12; file=" + res_dir + "/fonts/DejaVuSans.ttf";
View Full Code Here

Examples of com.jagpdf.Document.font_load()

        canvas.text_font(font_14);
        canvas.text(50, 800, horse);
        // true type
        String res_dir = testlib.getResourcesDir();
        String fspec = "enc=utf-8; size=12; file=" + res_dir + "/fonts/DejaVuSans.ttf";
        Font font_ttf = doc.font_load(fspec);
        canvas.text_font(font_ttf);
        canvas.text(50, 750, horse);
        // control rect
        canvas.rectangle(50, 200, 400, 450);
        canvas.path_paint("s");
View Full Code Here

Examples of com.jagpdf.Document.font_load()

        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
        String fspec = "enc=utf-8; size=12; file=" + res_dir + "/fonts/DejaVuSans.ttf";
        Font font_ttf = doc.font_load(fspec);
View Full Code Here

Examples of com.jagpdf.Document.font_load()

        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
        String fspec = "enc=utf-8; size=12; file=" + res_dir + "/fonts/DejaVuSans.ttf";
        Font font_ttf = doc.font_load(fspec);
        canvas.text_font(font_ttf);
        canvas.text(50, 750, horse);
        // finalize
        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.