pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hewson <j...@jahewson.com>
Subject Re: How to turn text mode back on?
Date Thu, 10 Mar 2016 21:25:47 GMT

> On 10 Mar 2016, at 13:14, Blake McBride <blake1024@gmail.com> wrote:
> Hi,
> Using 2.x here.  I understand that I need to exit text mode via
> contentStream.endText() before printing things like lines.  Fine.  But, if
> I contentStream.endText(), and print some lines, how can I re-enable text
> mode?  I tried contentStream.beginText() but it didn't work.  Sure
> appreciate any help!

These methods just emit PDF’s begin text (BT) and end text (ET) operators.
Basically, you only need to use them when you switch between text and
graphics. You can put as many lines and paragraphs of text as you like inside
a single BT, ET pair:


The text operators between BT and ET can draw text, update the text matrix,
make new lines, etc. Note that BT, ET are *never* nested.

> Blake McBride

To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org

View raw message