Ugly borders around Components when printing to PDF


Hi there

I have a print function in my app. It is collecting a couple of Components visible on the GUI and prints them on a PDF document. Alas this creates ugly black 1 px borders around them. (Funnily, some of the lines are appearing and disappearing when altering the zoom factor but this is most likely a sole issue with Acrobat Reader.)

I tried various ways to get rid of these borders in the paint method of the Components using the Graphics object. (Adding white rectangle by myself in order to overwrite, etc.) None of them succeeded, of course. The Components are added to one particular “print” Component which makes the document to print via

this->addAndMakeVisible(logoImageComponent); this->addAndMakeVisible(graph);
That’s it.
Has anyone also met this phenomen? Appreciate any ideas.


Looks to me like it’s not a line, but rather the join between two adjacent white rectangles. The rasteriser could easily mis-align their edges so that it sometimes looks like there’s a gap there. No idea why, though!