For example if I have one stream and call drawImage after a bunch of text
that works but then the text after the image does not work...it has losts
its position in the page and it's at the bottom left corner of the
page...can't set position text position anymore.

So that got me wondering how I am supposed to use PDPageContentStream, one
for all or is it one for each?  E.g. is the PDPageContentStream a layered
thing within the page?

-Dave

On Sat, Mar 27, 2021 at 9:40 AM David Hoffer <dhoff...@gmail.com> wrote:

> Yeah those two samples are too basic....I need to see how to do both on
> the same page (and same line).
>
> I have tried using one PDPageContentStream intermixing text & image and
> two PDPageContentStreams and so far not working correctly.  I don't yet see
> how I am supposed to do this.
>
> Thanks,
> -Dave
>
> On Sat, Mar 27, 2021 at 9:24 AM Tilman Hausherr <thaush...@t-online.de>
> wrote:
>
>> There are no examples for both but there is an example for text
>> (HelloWorld) and example for image (ImageTpPDF) in the examples
>> subdirectory of the source code download.
>>
>> You can do it in the same PDPageContentStream.
>>
>> Try using coordinate 50,500 for an image and 200,500 for a text.
>>
>> Re checkboxes, see the CreateCheckBox.java example.
>>
>> If you're struggling, what did you try?
>>
>> Tilman
>>
>> Am 27.03.2021 um 15:29 schrieb David Hoffer:
>> > I'm struggling to find examples of generating PDF with text and images
>> on
>> > the same line.  E.g. A column of checkbox images on the left then normal
>> > text to the right of each image.
>> >
>> > How to do this?  It's one PDDocument and one PDPage but is this one or
>> two
>> > PDPageContentStreams?
>> >
>> > Are there examples of this?
>> >
>> > Also if PDFBox had a native way of rendering checkboxes (checked and
>> > unchecked) that would be fine too instead of me supplying the images.
>> >
>> > Thanks,
>> > -Dave
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
>> For additional commands, e-mail: users-h...@pdfbox.apache.org
>>
>>

Reply via email to