printer.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <?xml version="1.0" encoding="ISO8859-1"?>
  2. <fpdoc-descriptions>
  3. <!--
  4. $Id$
  5. This file is part of the FPC documentation.
  6. Copyright (C) 1997, by Michael Van Canneyt
  7. The FPC documentation is free text; you can redistribute it and/or
  8. modify it under the terms of the GNU Library General Public License as
  9. published by the Free Software Foundation; either version 2 of the
  10. License, or (at your option) any later version.
  11. The FPC Documentation is distributed in the hope that it will be useful,
  12. but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. Library General Public License for more details.
  15. You should have received a copy of the GNU Library General Public
  16. License along with the FPC documentation; see the file COPYING.LIB. If not,
  17. write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  18. Boston, MA 02111-1307, USA.
  19. -->
  20. <package name="rtl">
  21. <module name="printer">
  22. <short>Provide access to the printer.</short>
  23. <!-- \FPCexampledir{printex} -->
  24. <descr>
  25. This chapter describes the PRINTER unit for Free Pascal. It was written for
  26. dos by Florian Klaempfl, and it was written for linux by Michael Van
  27. Canneyt, and has been ported to Windows and os/2 as well.
  28. Its basic functionality is the same for al supported systems, although there
  29. are minor differences on linux/unix.
  30. </descr>
  31. <element name="lst">
  32. <short>Default printing file.</short>
  33. <descr>
  34. <var>Lst</var> is the standard printing device. <br/> On linux,
  35. <var>Lst</var> is set up using <var>AssignLst('/tmp/PID.lst')</var>.
  36. </descr>
  37. <seealso>
  38. <link id="AssignLst"/>
  39. </seealso>
  40. </element>
  41. <element name="AssignLst">
  42. <short>Assign text file to printing device</short>
  43. <descr>
  44. <p>
  45. <var>AssignLst</var> Assigns to <var>F</var> a printing device - <em>Unix only</em>.
  46. <var>ToFile</var> is a string with the following form:
  47. </p>
  48. <ul>
  49. <li> <var> '|filename options'</var> : This sets up a pipe with the program filename,
  50. with the given options, such as in the popen() call.
  51. </li>
  52. <li> <var> 'filename'</var> : Prints to file filename. Filename can contain the string 'PID'
  53. (No Quotes), which will be replaced by the PID of your program.
  54. When closing lst, the file will be sent to lpr and deleted.
  55. (lpr should be in PATH)
  56. </li>
  57. <li> <var> {'filename|'}</var> Idem as previous, only the file is NOT sent to lpr, nor is it
  58. deleted. (useful for opening /dev/printer or for later printing)
  59. </li>
  60. </ul>
  61. </descr>
  62. <errors>
  63. Errors are reported in Linuxerror.
  64. </errors>
  65. <seealso>
  66. <link id="lst"/>
  67. </seealso>
  68. <example file="printex/printex"/>
  69. </element>
  70. </module>
  71. </package>
  72. </fpdoc-descriptions>