Details
Description
When displaying or printing a PDF that uses the CloseFillNonZeroAndStrokePath OperatorProcessor, the stroke is not done.
This is because the FillNonZeroRule which is executed before the stroke calls PageDrawer.fillPath(), which does a reset of the path via getLinePath().reset().
After the reset, the path is empty, so the stroke operation just does nothing.
I helped myself by changing CloseFillNonZeroAndStrokePath.java like this:
public void process(PDFOperator operator, List<COSBase> arguments) throws IOException {
context.processOperator( "h", arguments );
// clone the path
PageDrawer pd = (PageDrawer) context;
GeneralPath p = (GeneralPath)pd.getLinePath().clone();
context.processOperator( "f", arguments );
// and restore before calling stroke
pd.setLinePath(p);
context.processOperator( "S", arguments );
}
This seems like a hack, so you guys probably know a cleaner way to fix this.