F_P_aus_K wrote:
> hallo i have a problem to position the text.
> 
> i would like have a Parameterlist with a picture biside the Parameter List,
> like this:
> 
> Parameter1: ...      Picture(2*1,5 inch)
> Parameter2: ...
> ...
> 
> but i dont know, how to do
> 
> i have try this
>  p1 = New Phrase()
>       ck = New Chunk(" aaaa ") : ck.setBackground(New java.awt.Color(&HFF,
> &HFF, &H0)) : p1.add(ck)
>       ck = New Chunk(vbCrLf) : p1.add(ck)
>       ck = New Chunk(" bbbb ", fonts(2)) : ck.setBackground(New
> java.awt.Color(&HFF, &HFF, &H0)) : p1.add(ck)
>       ck = New Chunk(vbCrLf) : p1.add(ck)
>       ck = New Chunk(" cccc ") : ck.setBackground(New java.awt.Color(&HFF,
> &HFF, &H0)) : p1.add(ck)
>    Dim img = Image.getInstance(ProductsDescriptionStruct.pPicture(k))
>       img.scaleToFit(img.width / 4.08, img.height / 4.08) ' 4.08 ist ein
> imperisch ermittelter Skallierungsfaktor, damit die richtige Größe
> dargestellt wird , muß geklärt werden
>       img.setAlignment(ElementConst.ALIGN_CENTER)
>       ck = New Chunk(img, 200, 3 - img.height / 4.08)
>       p1.add(ck)
>       aDocument.add(p1)
> 
> but i dont get the result as desired!

Organize all your content in a table and your life will be
much easier. With all those Phrases and Chunks your code looks
really messy. Reading only your code it's hard to imagine what
the result should look like, so it probably doesn't surprise
anyone that the result is not as desired. It's as if you started
coding in the wild without thinking. Why else would you have used
Phrases and Chunks with newlines instead of Paragraphs?

Seriously: try finding some examples with PdfPTable first:
http://itextdocs.lowagie.com/tutorial/objects/tables/index.php
-- 
This answer is provided by 1T3XT BVBA

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to