I'm drawing lines in PDF that I want to scale in a ratio other than 1:1.
The problem is that i get strokes that looks like they been drawn with a caligraphic pen.
Is it possible somehow in PDF to resize the path, restore the graphics state and then draw the stroke of the previous path.
This is how I get caligraphical line strokes in PDF:
5 w // width of stroke
q // saves the current graphics state
0 1 0 0.2 0 0 cm // transformation matrix scaling with height reduced to 20%
0 10 m // Start of line
10 10 l // line to
20 100 l
30 100 l
40 10 l
S // draws stroke
Q // Restores graphics state
In HTML5 canvas it's possible to draw stroke after restoring the graphics state so that the path is drawn by a equally width line.
http://www.html5canvastutorials.com/advanced/html5-canvas-ovals/
In PDF putting S after Q doesn't work.
Is there some way to get the same result in PDF where only the line path gets scaled, not the stroke itself?