184. Printerdb

Defines for handling PPD files and database of PPD files

184.1. Summary of Module Globals

List of Global Functions

List of Global Variables

  • foomatic - map of foomatic printers database

184.2. Global Functions

184.2.1. AreDriversInstalled

Check if drivers for current spooler are installed

Return value

  • boolean - true if all available drivers are installed

184.2.2. GetDriverPackages

Get list of packages containing drivers for the current spooler

Return value

  • list<string> - a list of package names

184.2.3. GetDriversAreInstalled

Get the info if packages with drivers were installed

Return value

  • boolean - saying if the driver packages have been installed

184.2.4. GetSupportedFilters

Get the list of supported filters

Return value

  • list<string> - a list of known filters or nil if all filters are known

184.2.5. InstallDrivers

Install drivers for current spooler, reread database

Return value

  • boolean - true on success

184.2.6. ListAllPpds

List all PPD files

Return value

  • list<map<string,string> > - a list of sorted PPD files (maps containing vendor_db, model_db, nick name and file name

184.2.7. PpdInfo

Get PPD file info

Function parameters

  • string file

Return value

  • map - of informations

184.2.8. SetDriverPackages

Set list of packages containing drivers for the current spooler

Function parameters

  • list<string> packages

Return value

  • void

184.2.9. SetDriversAreInstalled

Set the info if packages with drivers were installed

Function parameters

  • boolean installed

Return value

  • void

184.2.10. SetSupportedFilters

Set the list of supported filters

Function parameters

  • list<string> filters

Return value

  • void

184.2.11. getAutoPpdFile

Get the PPD file for automatic installation

Function parameters

  • string vendor_db

  • string device_db

Return value

  • string - name of the PPD file (filename), nil if no is usable

184.2.12. getFileFromNickName

Get file name of the PPD files for specified model with the specified nick name

Function parameters

  • string vendor_db

  • string device_db

  • string nick

  • string lang

Return value

  • string - file with the specified nick name

184.2.13. getFilesFromNickName

Get file names of all PPD files for specified model with the specified nick name

Function parameters

  • string vendor_db

  • string device_db

  • string nick

  • string lang

Return value

  • list<string> - a list of all files with the specified nick name

184.2.14. getFoomaticDefaultQueue

Get proposed default queue when using foomatic db

Function parameters

  • list<map> queues

Return value

  • string - proposed default queue name

184.2.15. getPpdFileOptions

Get the options of the PPD file

Function parameters

  • string filename

  • boolean checkLocale

Return value

  • list<map> - a list of all options of the PPD file (in UTF-8)

184.2.16. getPpdFiles

get configurations, which may be usable for detected printer

Function parameters

  • string vendor_db

  • string device_db

Return value

  • map - of ppd files (filename -> description)

184.2.17. getUpdatedPpdFile

Get PPD file updated according to printer options and add it's name to printer description map

Function parameters

  • map<string,any> entry

Return value

  • map<string,any> - updated printer map

184.2.18. loadFoomaticIfNeeded

Check whether foomatic database has been loaded, and if not, then load it

Return value

  • void

184.2.19. processPpdFiles

Process downloaded PPD files

Function parameters

  • string dir

Return value

  • boolean - true on success

184.2.20. sortPpds

Sort PPD files for specified model according to preference list

Function parameters

  • string vendor_db

  • string device_db

Return value

  • list<string> - a list of sorted PPD nicknames

184.3. Global Variables

184.3.1. foomatic

map of foomatic printers database

184.4. Module Requirements

184.4.1. Module Imports

  • CommandLine
  • Label
  • Mode
  • Package
  • Printerlib
  • Report
  • Stage

184.4.2. Module Includes