Calling all Encapsulated PostScript gurus.
I am trying to write eps files on the fly. They are for labels which we want to print on a big Roland Vinyl Printer/Cutter.
The software which receives the file is called Versaworks and will only accept eps files.

I can create the label correctly using bitmaps etc and it writes to eps fine and I can view it in Versaworks no problem.
The problem is getting Versaworks to recognise the CutContour for cutting out each label.
The CutOut colour is RGB 128,128,128. I have checked this by creating eps files from Photoshop and others and that's the colour they use and it works.
I must be doing something wrong creating the colour!!!
The bitmap I create and write to eps file could contain any number of labels and each label has a rectangular cutout.

Here is my code including comments of success or failure...

Code:
    Private Function ConvertBitmapToEps(bitmap As Bitmap, epsFilePath As String, RectsToCut As List(Of Rectangle)) As Boolean
        Try
            'create and save an eps file for roland printer (versaworks)
            Using fs As New FileStream(epsFilePath, FileMode.Create, FileAccess.Write)
                Using writer As New StreamWriter(fs)
                    ' Write EPS header - WORKS FINE BUT AM I MISSING ANYTHING IMPORTANT?
                    writer.WriteLine("%!PS-Adobe-3.0 EPSF-3.0")
                    writer.WriteLine("%%BoundingBox: 0 0 " & bitmap.Width & " " & bitmap.Height)
                    writer.WriteLine("%%LanguageLevel: 3")
                    writer.WriteLine("%%Creator: FiF EPS Converter")
                    writer.WriteLine("%%Title: Converted Bitmap with CutContour")
                    writer.WriteLine("%%DocumentCustomColors: CutContour")
                    writer.WriteLine("%%EndComments")

                    ' Write image data - WORKS FINE
                    writer.WriteLine("/picstr " & (bitmap.Width * 3) & " string def")
                    writer.WriteLine(bitmap.Width & " " & bitmap.Height & " scale")
                    writer.WriteLine(bitmap.Width & " " & bitmap.Height & " 8 [" & bitmap.Width & " 0 0 -" & bitmap.Height & " 0 " & bitmap.Height & "]")
                    writer.WriteLine("{currentfile picstr readhexstring pop} false 3 colorimage")
                    For y As Integer = 0 To bitmap.Height - 1
                        For x As Integer = 0 To bitmap.Width - 1
                            Dim color As Color = bitmap.GetPixel(x, y)
                            writer.Write("{0:X2}{1:X2}{2:X2} ", color.R, color.G, color.B)
                        Next
                        writer.WriteLine()
                    Next
                    writer.WriteLine("grestore")

                    'set the CutContour color (RGB 128,128,128) 
                    'I tried this as a spot color which I am told is the correct method and I am told it must be called CutContour
                    'it shows in Versaworks but as black and is NOT recognised as a cutout
                    writer.WriteLine("/CutContour {0.501961 0.501961 0.501961 def_spotcolorRGB}")
                    writer.WriteLine("CutContour 1.000000 set_spotcolorRGB")
                    'if I try as a rgb color it shows up as the right color but is NOT recognised as a cutout
                    'writer.WriteLine("/CutContour { 0.501961 0.501961 0.501961 setrgbcolor } bind def")
                    'writer.WriteLine("CutContour 1.000000")

                    'create the cutout rectangles from the rects list
                    'this creates the rectangles in perfect size and location
                    'it is HOW I am using the color that seems to be the problem
                    writer.WriteLine("false setoverprint")
                    For i = 0 To RectsToCut.Count - 1
                        With RectsToCut(i)
                            writer.WriteLine((.X + .Width) & " " & (.Y + .Height) & " moveto") 'bottom right
                            writer.WriteLine((.X) & " " & (.Y + .Height) & " lineto") 'bottom left
                            writer.WriteLine(.X & " " & .Y & " lineto") 'top left
                            writer.WriteLine((.X + .Width) & " " & .Y & " lineto") 'top right
                            writer.WriteLine((.X + .Width) & " " & (.Y + .Height) & " lineto") 'bottom right
                        End With
                        writer.WriteLine("closepath")
                        writer.WriteLine("stroke")
                        writer.WriteLine("false setoverprint")
                        'reset
                        writer.WriteLine("CutContour 1.000000 set_spotcolorRGB")
                        'writer.WriteLine("CutContour 1.000000")
                    Next
                    'the end
                    writer.WriteLine("%%EOF")
                End Using
            End Using
            Return True
        Catch ex As Exception
            WriteToErrorFile(ex)
            Return False
        End Try

    End Function
Any help with this would be appreciated. I have spent hours on it to no avail.
Cheers