I found a program I did some time ago to embedd a TrueType font. In this
program processResource() does more or less the same as
BaseFont.getDocumentFonts() and refNum is the reference to the font
descriptor.

Paulo

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Tibi
> Sent: Friday, September 15, 2006 10:18 AM
> To: [email protected]
> Subject: Re: [iText-questions] replace font (iText)
> 
> Paulo Soares <psoares <at> consiste.pt> writes:
> 
> > 
> > It can be done with BaseFont.getDocumentFonts(). This will 
> get you the
> > font name and the reference to the font dictionary. From 
> there on refer
> > to the PDF reference to add the actual font stream to the font
> > descriptor.
> > 
> > Paulo 
> 
> 
> 
> 
> Thanks for your (Bruno and Paulo) answers!
> 
> So, I start to write the java code (follow the 
> BaseFont.getDocumentFonts step):
> 
> ArrayList fonts = BaseFont.getDocumentFont(pdfReader);
> for (int i=0; i<fonts.size(); i++) {
>     Object[] font = (Object[])fonts.get(i);
>     String fontName = (String)font[0];
>     PRIndirectReference fontRef = (PRIndirectReference)font[1];
>     // ???
> }
> 
> But how can I "overwrite" the font (replace the used (old) 
> font to an another 
> (new))?
> I can't find that method in PRIndirectReference, or else.
> So, how can I do this?
> 
> Thanks and best regards
> Tibi
> 
> 
> --------------------------------------------------------------
> -----------
> Using Tomcat but need to do more? Need to support web 
> services, security?
> Get stuff done quickly with pre-integrated technology to make 
> your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on 
> Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&;
> dat=121642
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.

Attachment: emb_font.java
Description: emb_font.java

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to