Am 31.12.2019 um 10:46 schrieb Peter Murray-Rust:
First,
many thanks for the quick response and your patience. I

On Tue, Dec 31, 2019 at 5:49 AM Tilman Hausherr <thaush...@t-online.de>
wrote:

Can we simplify this question and focus on one single thing?

Is the core of the question that the circle on the bottom left is filled
with red color, but it shouldn't be?

Yes. I assume the red colour comes from the text fill already processed

THat

|PDGraphicsstroke:AWTfill:java.awt.Color[r=255,g=0,b=0] should be
||PDGraphicsstroke:AWTfill:null|
||

Yes. (I convert AWTFill: null to SVG:"none")
?


What I meant is that in the SO question, fill is set to something, but I'd expect it to be nothing.


If so, can you reproduce the whole thing with a PDF that has only that
circle? (I can create such a PDF for you)

It should probably have a single filled character preceding the circle
since that is providing the fill colour.


Weird stuff:

- your |strokePath() method is different on SO and on github|

My bad in copying. I probably tried to simplify it. Are you happy to work
from the Github code?

Some questions which will clarify the process for me (and hopefully avoid
wasting your time):
* that the strategy of intercepting fillPath and strokePath and capturing
the graphics attributes and path is viable?


Yes

See also

https://stackoverflow.com/questions/38931422/pdfbox-2-0-2-calling-of-pagedrawer-processpage-method-caught-exceptions

and the follow up link.


* that fillPath draws both fill and stroke in the AWT canvas (and that
strokePath does the same) so that either may be called. This doesn't seem
right


No, fill and stroke are different things, the pure fill does not stroke. There is also a combined operation, the resulting shape is fatter than the pure fill. Especially if the line width is > 1.



* the calls were after " beginText ...endText" - does endText clear the
stroke/fill attributes?


I don't know. But this isn't really a topic, people usually separate these.

In your file it the text is between q...Q so it doesn't matter anyway.


* are fill, stroke and (Basic)Stroke (which provides lineWidth, etc.) the
only states that need to be considered?


Here I didn't understand the question. Or maybe you mean the graphics state? See in the code, there's a lot. But this question is really about the two colors, so concentrate on that one.




I will tidy the Github code, create a simpler example (I export PDF from
PPT, but could use Inkscape), and work from that.


Yes please


Tilman



P.




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

Reply via email to