PdfContentByte.saveState() saves everything including the font, matrix,
colors, etc.

Paulo 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Darryl Miles
> Sent: Wednesday, May 17, 2006 9:38 AM
> To: [email protected]
> Subject: [iText-questions] Storing a PdfContentByte state ?
> 
> Storing a PdfContentByte state ?
> 
> Is it possible to store the configuration of a PdfContentByte so that 
> the currently selected font and size (amongst other things) is 
> preserved, I'm thinking the whole state from the iText side.  This 
> allows the programmer to run a sub-method which can reconfigure the 
> entire PdfContentByte to do its work and then restore the 
> state before 
> it return.  The most common problem for me is selecting another font 
> with cb.setFontAndSize();
> 
> There is PdfContentByte.saveState() (which I presume is used for 
> PostScript "savestate") which is good to revert back to 
> previous matrix 
> translation, this is in relation to PostScript graphics state 
> so works 
> within the PDF language.
> 
> Does the same exist for the PdfContextByte context within the 
> API.  This 
> would be implemented on the iText library side, rather than something 
> which would be translated into  PS the PDF.
> 
> Feel free the point out if my design pattern is a bad idea and I have 
> incorrect thinking.
> 
> PdfContentByte.saveContentByte();      // stacking recursive 
> state push
> PdfContentByte.restoreContentByte();   // stacking recursive state pop
> PdfContentByte.loadContentByte(PdfContentByteConfig 
> pdfContentByteConfig);   // overwrite current
> PdfContentByteConfig pdfContentByteConfig = 
> PdfContentByte.saveContentByte();   // get copy of current
> 
> 
> Darryl
> 
> 
> 
> -------------------------------------------------------
> 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