pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilad Denneboom <gilad.denneb...@gmail.com>
Subject Re: Move rotated text to center of page
Date Tue, 24 Jan 2017 21:58:04 GMT
One other thing: Is it possible to set the text's opacity level?

On Tue, Jan 24, 2017 at 10:53 PM, Gilad Denneboom <gilad.denneboom@gmail.com
> wrote:

> Hi all,
>
> I'm using a PDPageContentStream to create a watermark which is rotated by
> 45 or 315 degrees, and I would like to place it at the center of the page's
> media box, but I can't seem to get it to work because the setTextRotation
> function moves the bottom-left corner of the box, and I can't figure out
> how the moveTextPositionByAmount works...
> Basically what I would like is to be able to calculate the height and
> width of the text, so I could figure out where on the page to place it so
> that the center of both objects are aligned. Any tips how to achieve that?
>
> Thanks in advance!
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message