pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chitgoks <chitg...@gmail.com>
Subject Re: freetext, drawing, polygon annotation
Date Tue, 07 Mar 2017 08:05:55 GMT
Hi Tilman

I got it to work. My previous inquiry was correct. Only 1 array containing
all the points (x,y);

And thank you regarding COSName.getPDFName(), Guess some names are not part
of COSName and will have to be created using that.

I have a few last questions. this is with regards to FreeText.

1) how to set the font, font size and foreground color?

PDAnnotationMarkup's setColor will set it as background if sub type is free
text. but i wish to change the text color. In a different library i used,
it was through using an appearance. But PDAppearanceDictionary does not
contain methods on setting font, font size and color.

2) If my dimension for PDRectangle is short, free text will cut off some
text unless i click it in acrobat then its width will be recalculated and
fit to the text. Is there a way to make the rectangle auto-fit based on the
free text's text width and height?

On Tue, Mar 7, 2017 at 3:55 PM, chitgoks <chitgoks@gmail.com> wrote:

> hi tilman.
> apologies
> that was how i understood array of n arrays. i thought it meant array
> containing arrays and i used the same code that you gave which is found in
> FDFAnnotationInk class hence that output.
> should the final output be something like this?
> [0,1,2,3,4,5,6,7,8,9,10 ...]
> where every 2 index representing the x and y?
> please advise
> thank you

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