It's an iText bug in PdfContentByte. The fix is in the CVS.

Paulo 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Darryl Miles
> Sent: Thursday, May 18, 2006 9:39 AM
> To: [email protected]
> Subject: Re: [iText-questions] Storing a PdfContentByte state ?
> 
> 
> I have not looked at the output PDF data but am using Acrobat 
> 7.0.7 to 
> display.
> 
> 
> Moving the cb.setFontAndSize() inbetween BT/ET makes no 
> difference in my 
> testing to the output (despite my previous claim it did).  The only 
> thing that reliably corrects the problem is to use the extra 
> cb.setFontAndSize().
> 
> Another thing I noted in chopping down the code is it only affect 
> ALIGN_RIGHT.  Which makes me think it is an acrobat rendering bug.
> 
> 
> I have a working compilable example and example output files I have 
> prepared into a ZIP file.  I will shortly email to everyone 
> who posted a 
> reply/followup to the thread, if you didn't want it feel free to just 
> delete it from your inbox.  If I have missed you out and you 
> would like 
> a copy email me privately.
> 
> Regards,
> 
> Darryl
> 
> 
> 
> Mark Storer wrote:
> > That code looks kosher to me.  It may be that you're 
> running into a bug in Acrobat's imaging model.  If I'm 
> following things correctly, your output will look something like:
> > 
> > ---
> > /foo 8 Tf        %%cb.setFontAndSize()
> > q                %%cb.saveState()
> > <stuff>
> > Q                %%cb.restoreState();
> > BT               %%cb.beginText();
> > <more stuff>
> > ET               %%cb.endText();
> > ---
> > 
> > That "Tf" (set the font and size) operator is really only 
> valid inside a beginText/endText block.  Given your later 
> comments, it sounds like this will work and be valid:
> > 
> > public void outerMethod(PdfContentByte cb, BaseFont font) {
> >   cb.beginText();
> >   cb.setFontAndSize(font.getBaseFont(), 8);
> >   cb.endText();
> > 
> >   //the rest is left alone
> >   ...
> > }
> 
> 
> -------------------------------------------------------
> 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.



-------------------------------------------------------
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&kid0709&bid&3057&dat1642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to