> Maruan,
>
> I am checking bold sentences inside a page. After reading each letter
> specifications using PDFontDescriptor, if that letter is not bold then I save
> the last bold sentence collected before this letter, and so on till the end
> of the page.
> The problem is in the last letter in the page, if it is bold but it is the
> last letter in the page, then I want to collect this sentence before exiting
> the processTextPosition(...) method.
Havn't looked at it in detail but what about extending processPage()?
BR
Maruan
>
> I am not sure if I am clear or still not!
>
>
> Best regards,
> Hesham
>
> --------------------------------------------------------------------------------------------------
> Included Message:
>
> Hi,
>
> by stream you mean a (page) content stream?
>
> Could you elaborate a little about what you're trying to achieve?
>
> BR
> Maruan
>
>
> > Hello ,
> >
> >
> >
> > I am using processTextPosition(.) to read text in a PDF file. I wonder
> > if there is a way to know if this is the last character in the stream
> > that it is being processed. I need to check this in the
> > processTextPosition(.) to execute some code. Here is my code:
> >
> >
> >
> > CustomStripper customStripper = new CustomStripper();
> >
> > customStripper.setStartPage( 1 );
> >
> > customStripper.setEndPage( 5 );
> >
> > Writer w = new OutputStreamWriter( new ByteArrayOutputStream() );
> >
> > customStripper.writeText( pdfDoc, w );
> >
> >
> >
> > public class CustomStripper extends PDFTextStripper {
> >
> > @Override
> >
> > public void processTextPosition( TextPosition t ) {
> >
> > // Some processing code.
> >
> > // I need to check if this is the last
> > letter to process in this stream!!!
> >
> > }
> >
> > }
> >
> >
> >
> > Best regards,
> >
> > Hesham
> >
> >
> >
> >
> >
> > ---
> > This email has been checked for viruses by Avast antivirus software.
> > https://www.avast.com/antivirus
> --
> Maruan Sahyoun
>
> FileAffairs GmbH
> Josef-Schappe-Straße 21
> 40882 Ratingen
>
> Tel: +49 (2102) 89497 88
> Fax: +49 (2102) 89497 91
> [email protected]
> www.fileaffairs.de
>
> Geschäftsführer: Maruan Sahyoun
> Handelsregister: AG Düsseldorf, HRB 53837
> UST.-ID: DE248275827
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
--
Maruan Sahyoun
FileAffairs GmbH
Josef-Schappe-Straße 21
40882 Ratingen
Tel: +49 (2102) 89497 88
Fax: +49 (2102) 89497 91
[email protected]
www.fileaffairs.de
Geschäftsführer: Maruan Sahyoun
Handelsregister: AG Düsseldorf, HRB 53837
UST.-ID: DE248275827
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]