Hello there,
On Thu, Mar 4, 2010 at 9:26 AM, Robert Main <[email protected]> wrote:
> Hello. I have PDFs that e.g. have circles or filled rectangles in them which
> aren't images. How am I able to identify those and get information about
> them, such as position etc.? Someone told me those are paths, but I see no
> way to access them via PDFBox.
>
Please take a look at the class
org.apache.pdfbox.pdfviewer.PageDrawer, methods #fillPath(int) and
#strokePath()
Here's an example:
class PrintPaths extends PageDrawer {
@Override
public void fillPath(int windingRules){
System.out.println(getLinePath());
super.fillPath(windingRules);
}
@Override
public void strokePath(){
System.out.println(getLinePath());
super.strokePath();
}
}
VR