I have a PostScript file with a shfill in it that views fine in tools such as gv and converts fine to png using ghostscript however the shfill disappears when using ps2pdf on Linux (which uses gs device PDFWriter i believe). Anyone have a hunch why ?
%%BoundingBox: 40 13 555 829
%%HiResBoundingBox: 40.2072703937 13.1732283465 554.7927296063 828.8267716535
%%PageOrientation: Portrait
%%Pages: 1
%%EndComments
%%Page: page 1
grestore
gsave %pre-tile 0
14.1732283465 14.1732283465 translate
%portrait
27.0340420472 0.0000000000 translate
%539.619501 813.653543 scale
0.0040682677 0.0040682677 scale
newpath
grestore
gsave %pre-tile 0
14.1732283465 14.1732283465 translate
%portrait
27.0340420472 0.0000000000 translate
%539.619501 813.653543 scale
0.0040682677 0.0040682677 scale
<< /ShadingType 5
/ColorSpace /DeviceRGB
/VerticesPerRow 2
/DataSource [
119726 154712 1.00 0.56 0.38 123209 154712 1.00 0.56 0.38
119726 158195 1.00 0.65 0.50 123209 158195 1.00 0.65 0.50
119726 161679 1.00 0.74 0.62 123209 161679 1.00 0.74 0.62
119726 165163 1.00 0.82 0.75 123209 165163 1.00 0.82 0.75
119726 168647 1.00 0.91 0.87 123209 168647 1.00 0.91 0.87
119726 172131 1.00 1.00 1.00 123209 172131 1.00 1.00 1.00
119726 175614 0.91 1.00 1.00 123209 175614 0.91 1.00 1.00
119726 179098 0.82 0.99 1.00 123209 179098 0.82 0.99 1.00
119726 182582 0.73 0.99 1.00 123209 182582 0.73 0.99 1.00
119726 186066 0.64 0.99 1.00 123209 186066 0.64 0.99 1.00
119726 189550 0.55 0.99 1.00 123209 189550 0.55 0.99 1.00
]
>> shfill
The software is running on an up-to-date Ubuntu 20. The gs version ps2pdf uses is
GPL Ghostscript 9.50 (2019-10-15) Copyright (C) 2019 Artifex Software, Inc. All rights reserved.
Update: I've gotten one step closer to the problem by at least having a workaround:
When i remove the scale operator and perform the scaling manually by mul in the shfill then the PDF conversion works fine
%!PS-Adobe-3.0 EPSF-3.0
14.1732283465 14.1732283465 translate
27.0340420472 0.0000000000 translate
%0.0040682677 0.0040682677 scale
<< /ShadingType 5
/ColorSpace /DeviceRGB
/VerticesPerRow 2
/DataSource [
119726 0.0040682677 mul 154712 0.0040682677 mul 1.00 0.56 0.38
123209 0.0040682677 mul 154712 0.0040682677 mul 1.00 0.56 0.38
119726 0.0040682677 mul 158195 0.0040682677 mul 1.00 0.65 0.50
123209 0.0040682677 mul 158195 0.0040682677 mul 1.00 0.65 0.50
119726 0.0040682677 mul 161679 0.0040682677 mul 1.00 0.74 0.62
123209 0.0040682677 mul 161679 0.0040682677 mul 1.00 0.74 0.62
119726 0.0040682677 mul 165163 0.0040682677 mul 1.00 0.82 0.75
123209 0.0040682677 mul 165163 0.0040682677 mul 1.00 0.82 0.75
119726 0.0040682677 mul 168647 0.0040682677 mul 1.00 0.91 0.87
123209 0.0040682677 mul 168647 0.0040682677 mul 1.00 0.91 0.87
119726 0.0040682677 mul 172131 0.0040682677 mul 1.00 1.00 1.00
123209 0.0040682677 mul 172131 0.0040682677 mul 1.00 1.00 1.00
119726 0.0040682677 mul 175614 0.0040682677 mul 0.91 1.00 1.00
123209 0.0040682677 mul 175614 0.0040682677 mul 0.91 1.00 1.00
119726 0.0040682677 mul 179098 0.0040682677 mul 0.82 0.99 1.00
123209 0.0040682677 mul 179098 0.0040682677 mul 0.82 0.99 1.00
119726 0.0040682677 mul 182582 0.0040682677 mul 0.73 0.99 1.00
123209 0.0040682677 mul 182582 0.0040682677 mul 0.73 0.99 1.00
119726 0.0040682677 mul 186066 0.0040682677 mul 0.64 0.99 1.00
123209 0.0040682677 mul 186066 0.0040682677 mul 0.64 0.99 1.00
119726 0.0040682677 mul 189550 0.0040682677 mul 0.55 0.99 1.00
123209 0.0040682677 mul 189550 0.0040682677 mul 0.55 0.99 1.00
]
>> shfill