Re: cgPS_Open crash [message #94168 is a reply to message #94167] |
Sat, 11 February 2017 17:06  |
Matthew Argall
Messages: 286 Registered: October 2011
|
Senior Member |
|
|
I have run into this problem before. cgPS_Config is a wrapper for the FSC_PSConfig object, but the two are not 100% compatible (cgPS_Open calls cgPS_Config). I created my own version of both so that they work better together. These are my notes on some of my "fixes".
Your particular problem stems from the fact that the ::Init and ::SetProperties methods of FSC_PSConfig do not accept the LANGUAGE_LEVEL keyword.
Note that these notes are from quite a while ago, so the real cg programs may have diverged a bit.
CGPS_CONFIG
----------------------------------------
; PAGETYPE is no longer included in the output structure because it is not accepted
; by the DEVICE procedure. Use the PAGETYPE keyword instead. Renamed the ISOLATIN
; keyword to ISOLATIN1. Abbreviated keyword still works.
; If PSOBJECT is passed in, its properties will be set. Useful with the MATCH
; keyword.
FSC_PSCONFIG
----------------------------------
; Font styles and font names are not reset every time the SetProperty method is called.
; SetProperty will set CMYK, ENCAPSULATED, ISOLATIN, LANDSCAPE, METRIC, TRUETYPE
; properties. Added the LANGUAGE_LEVEL, FONT_SIZE, PORTRAIT, and TT_FONT keywords
; to the Init and SetProperty methods so that they work with the DEVICE, cgPS_Open,
; and cgPS_Config. Removed the PAGETYPE and FONTTYPE fields from structure returned
; by GetKeywords because they are not accepted by the DEVICE procedure. Renamed
; ISOLATIN to ISOLATIN1 (abbreviated keyword still works).
; Correctly convert to and from IDL [xy]offsets to offsets from the lower left corner.
; Added the SANE_OFFSETS keyword to the GetKeywords method in case you want to
; pass the keyword structure to cgPS_Open or cgPS_Config.
CGPS_OPEN
--------------------------------------------
; PAGETYPE is returned as a keyword from cgPS_Config.
; Added the SET_FONT keyword as well as logic checking of TT_FONT for compatability
; with Device and FSC_PSConfig. Was passing a file path instead of the basename
; to cgPS_Config. Fixed. Added the pagetype keyword because it is no longer
; returned by FSC_PSConfig.
CGPS_CLOSE
--------------------------------------------
; Do not automatically delete the intermediate post script file if DELETE_PS is
; explicitly set to 0.
|
|
|