Sorry for my silence but I was in holiday :)

1T3XT info <info <at> 1t3xt.info> writes:

> 
> Marco wrote:
> > One question: from an acrofield I can get PdfName.DA to know the Helv type.
> 
> Please explain. You get an appearance stream containing the name /Helv.

read under..

> 
> > When I want to create the basefont I must use the constant "Helvetica" and 
> > not "Helv".
> 
> In the resources of this stream you can find out that /Helv is a name
> referring to a dictionary where one of the key-value pairs is
> /BaseFont /Helvetica
> 

Where can I find this dictionary?

> > There's a way to transform "Helv" in "Helvetica"? so I can use it to 
transform 
> > every font style.
> 
> The name used to refer to a font can be anything.
> Sometimes it will be /f1, it could even be /Marco.
> If you want the font name, you have to look in the
> resources dictionary (/DR).

I write the code I use:

//Start
PdfStamper stamp = new PdfStamper(reader, new FileOutputStream("c:\\XXX.pdf"));
AcroFields acroForm1 = stamp.getAcroFields();
acroForm1.setField("Testo3", "Prova marco con sfondo bianco");
Item testo3 = acroForm1.getFieldItem("Testo3");
ArrayList strutturaTesto = testo3.values;

//Get Item's dictionary
for (int i=0; i<strutturaTesto.size(); i++) {
   PdfDictionary dict = (PdfDictionary)strutturaTesto.get(i);
}
------------------------------------

In debug i read for dict variable:
{/[EMAIL PROTECTED], /Type=/Annot, /F=4, /AP=c
[EMAIL PROTECTED], /V=Prova marco con sfondo 
bianco, /Q=1, /Subtype=/Widget, /T=Testo3, /Ff=1, /Rect=com.lowagie.text.pdf.Pd
[EMAIL PROTECTED], /DA=/Helv 14 Tf 0 
g, /FT=/Tx, /[EMAIL PROTECTED]

I use the /DA that contain /Helv but I don't know how to use this to write 
another text using the same font type.

I don't see the /DR.

Thanks,
Marco


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to