Have a look at PdfLine. 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Kruno
> Sent: Tuesday, January 10, 2006 4:22 PM
> To: [email protected]
> Subject: [iText-questions] Detecting line breaks in Paragraph
> 
> Hi,
> 
> is there a way to detect or calculate on which characters in 
> Paragraph will
> the line break ?
> 
> For example:
> 
>   Document document = new Document(PageSize.A4, 50, 50, 50, 50);
> 
>   try {
>         PdfWriter.getInstance(document, new
> FileOutputStream("c:\\testpara.pdf"));
>         document.open();
>         Paragraph para = new Paragraph("Lorem ipsum dolorem 
> sit. Lorem ipsum
> dolorem sit.
>                             Lorem ipsum dolorem sit. Lorem 
> ipsum dolorem
> sit.");
>         document.add(para);
>     } catch (FileNotFoundException e) {
>         System.err.println("File error : " + e);
>     } catch (DocumentException e) {
>         System.err.println("Document error : " + e);
>     }
> 
>     document.close();
> 
> "Lorem ipsum dolorem sit. Lorem ipsum dolorem sit. Lorem 
> ipsum dolorem sit.
> Lorem ipsum " will be written in the 1st line and
> "dolorem sit." will be in 2nd line.
> 
> I'm trying to find which parts of the Paragraph will be 
> written in 1st, 2nd,
> .... , last line.
> 
> 
> Kruno
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep 
> through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  
> DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to