GdiRenderSettingsWorkAroundClosePathBug Property

If set, GDI (sub)paths will be closed by explicitly adding a line to the starting point of a (sub)path. If false, GDI subpaths will be closed via the GDI Path.CloseFigure() call. The default is false.

Namespace:  TallComponents.PDF.Rasterizer.Configuration
Assembly:  TallComponents.PDF.Rasterizer (in TallComponents.PDF.Rasterizer.dll) Version:
public bool WorkAroundClosePathBug { get; set; }

Property Value

Type: Boolean

By default, this settings is false, because drawing an explicit closing line in GDI results in a slightly worse connection with the start of the figure: the end of the line will not be smoothly "rounded" to match the start of the figure. So using Path.CloseFigure() is to be preferred in general.

Some printer drivers however (notably PCL drivers and the microsoft XPS Document Writer) have a bug in their CloseFigure implementation that will not only close the last subpath, but also some earlier subpaths that should actually remain open. This bug introduces extra lines for some documents.

To our knowledge there are very little documents that are affected by this bug, but if it occurs setting this flag to true will avoid these extra lines, at the cost of a slightly worse connection between the closing line and the start of the figure. This is often only noticeable for drawings that use relatively thick lines, as then the "rounding" to the start of the figure is most apparent. This means that setting this flag will lead to little problems for most documents either.

Please note that the XPS issues only apply when using Page.Draw() in combination with the Microsoft XPS Document Writer. They do not occur with pages that are converted via ConvertToWpf.

See Also