You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by Bronson Mathews <br...@haesemathematics.com.au> on 2019/05/06 05:03:54 UTC
Parsing pdf, linewidth is always 1.0
Hi,
Im trying to get the value of the linewidth of a stroke. However when
reading the value the returned value is always 1.0.
Code snipped from strokePath() function:
PDGraphicsState state = getGraphicsState();
cur_line_width = state.getLineWidth(); // this value is always 1.0
How can I get the correct stroke line width?
Thanks!
Re: Parsing pdf, linewidth is always 1.0
Posted by Tilman Hausherr <TH...@t-online.de>.
It could be that the value is really 1, but that it appears thicker
because there is a transformation. Have a look at
getGraphicsState().getCurrentTransformationMatrix()
See also the source code of PageDrawer.java to see what is done before a
linewidth is set (transformWidth())
Tilman
Am 06.05.2019 um 07:03 schrieb Bronson Mathews:
> Hi,
>
> Im trying to get the value of the linewidth of a stroke. However when
> reading the value the returned value is always 1.0.
> Code snipped from strokePath() function:
>
> PDGraphicsState state = getGraphicsState();
> cur_line_width = state.getLineWidth(); // this value is always 1.0
>
> How can I get the correct stroke line width?
>
>
> Thanks!
>
>
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org