Title: RE: [iText-questions] How to embed svg document in PDF

        iText can read SVG with batik and maintain the vector and text
characteristics of the original.
        Use the following code as a start:

        PdfContentByte cb = writer.getDirectContent();
        Graphics2D g2 = cb.createGraphics(500, 500);
        PrintTranscoder prm = new PrintTranscoder();
        TranscoderInput ti = new TranscoderInput("file:///C:/mapWaadt.svg");
        prm.transcode(ti, null);
        PageFormat pg = new PageFormat();
        Paper pp= new Paper();
        pp.setSize(500, 500);
        pp.setImageableArea(0, 0, 500, 500);
        pg.setPaper(pp);
        prm.print(g2, pg, 0);
        g2.dispose();

        You'll probably need to set the DefaultFontMapper with the correct
fonts.

Best Regards,
Paulo Soares


    -----Original Message-----
    From:   [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED] On Behalf Of andy

    Sent:   Saturday, January 03, 2004 5:48
    To:     [EMAIL PROTECTED]
    Subject:        [iText-questions] How to embed svg document in PDF

    Hi,

        Can you please help me by giveing instructions or url for embedding SVG
    in PDF.

    Thanks in advance
    Andy


    -------------------------------------------------------
    This SF.net email is sponsored by: IBM Linux Tutorials.
    Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
    Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
    Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
    _______________________________________________
    iText-questions mailing list
    [EMAIL PROTECTED]
    https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to