Fixed issue with dash array not being rendered, by not explicitly closing subpath before a stroke in PDF.