The metafiles are not deleted from the user's temp directory after closing the preview:
The function ferase() returns -1 (ie. error). This is a little sample showing the problem:
METHOD End() CLASS TPrinter
if ::hDC != 0
DeleteDC( ::hDC )
if ! ::lMeta
if ::lStarted
EndDoc(::hDC)
endif
else
Aeval(::aMeta,{|val| ferase(val) })#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oPrn, oFnt
PRINT oPrn NAME "Test" PREVIEW
DEFINE FONT oFnt NAME "Arial" SIZE 0, -12 OF oPrn
PAGE
oPrn:Say( 100, 100, "This is a test", oFnt )
ENDPAGE
ENDPRINT
RELEASE FONT oFnt
RETURN NIL