> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Alan Klikic
> Sent: Thursday, November 03, 2005 4:48 PM
> To: itext-questions@lists.sourceforge.net
> Subject: [iText-questions] base font and PDF encypting
> 
> Hi again.
> 
>  
> 
> I have 2 questions:
> 
>  
> 
> 1)
> 
>  
> 
> I' m trying to insert text that I have in string into PDFTemplate:
> 
>  
> 
> pdfTemplate.beginText();
> 
> BaseFont basefont = null;
> 
> try {
> 
>    basefont = BaseFont.createFont(BaseFont.TIMES_ITALIC,  
> 
>                                   BaseFont.CP1250, false);
> 
>

BaseFont.TIMES_ITALIC doesn't have the characters of CP1250. You'll need
a TTF or OTF font.
  
> 
> } catch (DocumentException e) {
> 
>                         
> 
> } catch (IOException e) {
> 
>                              
> 
> }
> 
> pdfTemplate.setColorStroke(Color.BLACK);
> 
> pdfTemplate.setFontAndSize(basefont, template.textFontSize[j]);
> 
>                            
> pdfTemplate.setTextMatrix(template.textX[j],
> 
>                            template.textY[j]);
> 
> pdfTemplate.showText(template.text[j]);
> 
> pdfTemplate.endText();
> 
> basefont = null;
> 
>  
> 
> Is it possible to find out PDF document encoding, so that I can create
> BaseFont with that encoding.
>

There's nothing to find out. You must know what you're writing.
 
>  
> 
> In this example I'm using BaseFont.CP1250, but there would be problems
> if trying to sign PDF with different encoding.
> 
>  
> 
> How can I solve this problem?
> 
>  

Use the correct font.

> 
>  
> 
> 2)
> 
>  
> 
> Does iText support pdf encrypting? If yes can u send me some 
> links where
> I can find examples?
> 

There are examples in the tutorial.

>  
> 
>  
> 
> Thanks for your help.
> 
> Your support is complimentary.
> 
> Alan
> 
>  
> 
> 
> 
> -------------------------------------------------------
> SF.Net email is sponsored by:
> Tame your development challenges with Apache's Geronimo App 
> Server. Download
> it for free - -and be entered to win a 42" plasma tv or your very own
> Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to