@@ -59,7 +59,7 @@ func validateBG2Entry(xRefTable *pdf.XRefTable, d pdf.Dict, dictName string, ent
5959 switch o := o .(type ) {
6060
6161 case pdf.Name :
62- s := o .String ()
62+ s := o .Value ()
6363 if s != "Default" {
6464 err = errors .New ("writeBG2Entry: corrupt name" )
6565 }
@@ -88,7 +88,7 @@ func validateUCR2Entry(xRefTable *pdf.XRefTable, d pdf.Dict, dictName string, en
8888 switch o := o .(type ) {
8989
9090 case pdf.Name :
91- s := o .String ()
91+ s := o .Value ()
9292 if s != "Default" {
9393 err = errors .New ("writeUCR2Entry: corrupt name" )
9494 }
@@ -112,7 +112,7 @@ func validateTransferFunction(xRefTable *pdf.XRefTable, o pdf.Object) (err error
112112 switch o := o .(type ) {
113113
114114 case pdf.Name :
115- s := o .String ()
115+ s := o .Value ()
116116 if s != "Identity" {
117117 return errors .New ("validateTransferFunction: corrupt name" )
118118 }
@@ -169,7 +169,7 @@ func validateTR2(xRefTable *pdf.XRefTable, o pdf.Object) (err error) {
169169 switch o := o .(type ) {
170170
171171 case pdf.Name :
172- s := o .String ()
172+ s := o .Value ()
173173 if s != "Identity" && s != "Default" {
174174 return errors .Errorf ("validateTR2: corrupt name\n " )
175175 }
@@ -238,7 +238,7 @@ func validateSpotFunctionEntry(xRefTable *pdf.XRefTable, d pdf.Dict, dictName st
238238 "Double" , "InvertedDouble" , "Line" , "LineX" , "LineY" , "Round" , "Ellipse" , "EllipseA" ,
239239 "InvertedEllipseA" , "EllipseB" , "EllipseC" , "InvertedEllipseC" , "Square" , "Cross" , "Rhomboid" })
240240 }
241- s := o .String ()
241+ s := o .Value ()
242242 if ! validateSpotFunctionName (s ) {
243243 return errors .Errorf ("validateSpotFunctionEntry: corrupt name\n " )
244244 }
@@ -470,7 +470,7 @@ func validateHalfToneEntry(xRefTable *pdf.XRefTable, d pdf.Dict, dictName string
470470 switch o := o .(type ) {
471471
472472 case pdf.Name :
473- if o .String () != "Default" {
473+ if o .Value () != "Default" {
474474 return errors .Errorf ("validateHalfToneEntry: undefined name: %s\n " , o )
475475 }
476476
@@ -528,7 +528,7 @@ func validateSoftMaskTransferFunctionEntry(xRefTable *pdf.XRefTable, d pdf.Dict,
528528 switch o := o .(type ) {
529529
530530 case pdf.Name :
531- s := o .String ()
531+ s := o .Value ()
532532 if s != "Identity" {
533533 return errors .New ("validateSoftMaskTransferFunctionEntry: corrupt name" )
534534 }
@@ -609,7 +609,7 @@ func validateSoftMaskEntry(xRefTable *pdf.XRefTable, d pdf.Dict, dictName string
609609 switch o := o .(type ) {
610610
611611 case pdf.Name :
612- s := o .String ()
612+ s := o .Value ()
613613 if ! validateBlendMode (s ) {
614614 return errors .Errorf ("validateSoftMaskEntry: invalid soft mask: %s\n " , s )
615615 }
0 commit comments