KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Detecting if the PDFCreator is available
PRODUCT: 4D | VERSION: 13.2 | PLATFORM: Mac & Win
Published On: December 13, 2012

The following code can be used to determine if the PDFCreator printer is available:

C_BOOLEAN($0)
ARRAY TEXT(namesArray;0)
ARRAY TEXT(altNamesArray;0)
ARRAY TEXT(modelsArray;0)

PRINTERS LIST(namesArray;altNamesArray;modelsArray)

$elem:=Find in array(namesArray;PDFCreator Printer name)

If ($elem#-1)
    // printer found
   $0:=True
Else
    // printer not found
   $0:=False
End if


If the above code is saved as UTIL_IsPDFCreatorAvail it can be used like this:

ALERT(String(UTIL_IsPDFCreatorAvail ))