On 27/12/2011 18:46, paul_brassington wrote:
> I want to develop images in java, such as a venn diagram or trianges with
> various angles and then put these images into a pdf.
>
> Why? these are maths questions and hence they are not real images.

Summarized: you want to create vector images NOT raster images.

> I believe I use com.itextpdf.text.Image;

Maybe OK, maybe not.
What you want to do, is to create a PdfTemplate object.
Then you want to draw lines, curves, shapes,... onto that PdfTemplate 
(using methods such as moveTo(), lineTo(), stroke(), arc(), rectangle(), 
and so on).
Once you have a PdfTemplate object, you can add it to the PDF document 
directly, or you can wrap it inside a com.itextpdf.text.Image object.

> Please advise how to put a simple rectangle into this class using Java.

Some examples:
Drawing methods: http://itextpdf.com/examples/iia.php?id=241
PdfTemplate / graphics state: http://itextpdf.com/examples/iia.php?id=242
(Browse the examples of chapter 14 for more info.)

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to