textfmt.1
上传用户:weiyuanprp
上传日期:2020-05-20
资源大小:1169k
文件大小:10k
源码类别:

传真(Fax)编程

开发平台:

C/C++

  1. ." $Id: textfmt.1,v 1.3 2009/09/29 11:46:01 faxguy Exp $
  2. ."
  3. ." HylaFAX Facsimile Software
  4. ."
  5. ." Copyright (c) 1993-1996 Sam Leffler
  6. ." Copyright (c) 1993-1996 Silicon Graphics, Inc.
  7. ." HylaFAX is a trademark of Silicon Graphics
  8. ." 
  9. ." Permission to use, copy, modify, distribute, and sell this software and 
  10. ." its documentation for any purpose is hereby granted without fee, provided
  11. ." that (i) the above copyright notices and this permission notice appear in
  12. ." all copies of the software and related documentation, and (ii) the names of
  13. ." Sam Leffler and Silicon Graphics may not be used in any advertising or
  14. ." publicity relating to the software without the specific, prior written
  15. ." permission of Sam Leffler and Silicon Graphics.
  16. ." 
  17. ." THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
  18. ." EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
  19. ." WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
  20. ." 
  21. ." IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
  22. ." ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
  23. ." OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  24. ." WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
  25. ." LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
  26. ." OF THIS SOFTWARE.
  27. ."
  28. .if n .po 0
  29. .ds Fx fIHylas-1FAXs+1fP
  30. .ds Ps Ps-2OSTs+2Ss-2CRIPTs+2
  31. .TH TEXTFMT 1 "May 17, 1996"
  32. .SH NAME
  33. textfmt - convert text to *(Ps(rg for facsimile transmission
  34. .SH SYNOPSIS
  35. .B ${LIBEXEC}/textfmt
  36. [
  37. .B -O
  38. .I config
  39. ] [
  40. .I options
  41. ] [
  42. .IR files ...
  43. ]
  44. .SH DESCRIPTION
  45. .I textfmt
  46. takes
  47. .SM ASCII
  48. text and generates formatted *(Ps(rg
  49. suitable for facsimile transmission.
  50. It is usually invoked as a filter program by the
  51. .IR sendfax (1)
  52. program.
  53. Input files may be specified on the command line.
  54. If none are given, then
  55. .I textfmt
  56. will read from standard input.
  57. .PP
  58. By default,
  59. .I textfmt
  60. will generate an output document that is formatted with a single
  61. vertical column of text, set in a 10 point fixed width font, and
  62. with a simple page header that consists of the file name, last
  63. modification date, and the page number.
  64. Pages are generated according to the default page dimensions
  65. (see
  66. .IR pagesizes (${MANNUM4_5})).
  67. When multi-column output is requested, text is set by default with
  68. a 7 point fixed width font.
  69. .SH OPTIONS
  70. Many of the options to
  71. .I textfmt
  72. have been chosen for compatibility with the Adobe Systems'
  73. .I enscript
  74. program; other options are for features that are not provided by
  75. .IR enscript .
  76. .TP
  77. .B -1
  78. Set text in one column.
  79. .TP
  80. .B -2
  81. Set text two columns.
  82. .TP
  83. .B -B
  84. Suppress page headers.
  85. .TP
  86. .B -c
  87. Clip long text lines instead of wrapping them at page margins.
  88. .TP
  89. .B -D
  90. Do not use
  91. .SM "ISO 8859-1"
  92. encoding in the generated *(Ps.
  93. .TP
  94. .BI -f " font"
  95. Set text using the *(Ps font named
  96. .IR font .
  97. .TP
  98. .BI -F " fontdir(s)"
  99. .IR Path(s)
  100. to s-1afms+1 font files.
  101. .TP
  102. .B -G
  103. Use a gaudy-style page header.
  104. .TP
  105. .BI -m " cols"
  106. Set text in
  107. .I cols
  108. columns.
  109. .TP
  110. .BI -M "fBl=fP#,fBr=fP#,fBt=fP#,fBb=fP#"
  111. Set the page margins; the default margins are:
  112. left and right .25 inch, top .85 inch, bottom .5 inch.
  113. .TP
  114. .B -o
  115. Draw an outline around each column of text; the specified number 
  116. defines the width of the line that is drawn.
  117. .TP
  118. .BI -O " config"
  119. Treat
  120. .I config
  121. as a configuration parameter specification that is interpreted
  122. after reading the configuration file.
  123. For example, ``-O Host:fax.example.com'' would set the
  124. .B Host
  125. configuration parameter to ``fax.example.com'', overriding any setting in
  126. the configuration file.
  127. .TP
  128. .BI -p " pts"
  129. Set text using fonts with
  130. .I pts
  131. point size (integer only).
  132. .TP
  133. .B -r
  134. Set pages rotated by 90 degrees (in ``Landscape mode'').
  135. .TP
  136. .B -R
  137. Set pages unrotated (in ``Portrait mode'').
  138. .TP
  139. .BI -s " size"
  140. Set the output size according to the named page size.
  141. Images are normally created with a system-default page size
  142. (usually letter-size pages, 8.5" by 11", for sites in North America).
  143. Alternate page sizes are specified symbolically using either
  144. the name or abbreviation of an entry in the
  145. .IR pagesizes (${MANNUM4_5})
  146. database; e.g.
  147. .I a3
  148. (ISO A3),
  149. .I a4
  150. (ISO A4),
  151. .I a5
  152. (ISO A5),
  153. .I a6
  154. (ISO A6),
  155. .I b4
  156. (ISO B4),
  157. .I na-let
  158. (North American Letter),
  159. .I us-leg
  160. (American Legal),
  161. .I us-led
  162. (American Ledger),
  163. .I us-exe
  164. (American Executive),
  165. .I jp-let
  166. (Japanese Letter),
  167. and
  168. .I jp-leg
  169. (Japanese Legal).
  170. Comparisons are case-insensitive and any match of a
  171. substring of the full page-size name is sufficient; e.g. ``legal'' would
  172. match ``American Legal''.
  173. .TP
  174. .B -U
  175. Reverse collate pages; that is the last page will appear first
  176. in the resultant *(Ps, then the next-to-last page, etc.
  177. .TP
  178. .BI -V " spacing"
  179. Set the line height; the default height is 1.2 x point size.
  180. .SH "CONFIGURATION PARAMETERS"
  181. .I textfmt
  182. reads configuration information from the files
  183. .BR ${LIBDATA}/hyla.conf ,
  184. and
  185. .BR ~/.hylarc ;
  186. in that order.
  187. Configuration files follow the conventions described in
  188. .IR hylafax-client (1).
  189. The following configuration parameters are recognized:
  190. .sp .5
  191. .nf
  192. fBTag Type Default DescriptionfP
  193. Columns integer s-11s+1 number of columns in formatted output
  194. GaudyHeaders boolean s-1Nos+1 enable/disable guady page headers
  195. FontMap       string  s-1fIsee belowfPs+1 location of ghostscript Fontmap file
  196. FontPath      string  s-1fIsee belowfPs+1 directory for font metric files
  197. ISO8859 boolean s-1Yess+1 use ISO 8859-1 character encoding
  198. LineWrap boolean s-1Yess+1 wrap/truncate text lines
  199. Orientation string s-1portraits+1 orientation of text on page
  200. OutlineMargin inches s-10s+1 width of outline line
  201. PageCollation string s-1forwards+1 collate pages in forward or reverse direction
  202. PageHeaders boolean s-1Yess+1 enable/disable page headers
  203. PageHeight float - output page height
  204. PageMargins string s-1fIsee belowfPs+1 margins for formatted page
  205. PageSize string s-1defaults+1 output page size from database
  206. PageWidth float - output page width
  207. TabStop integer s-18s+1 inter-stop setting in characters
  208. TextFont string s-1Couriers+1 name of font for setting text
  209. TextLineHeight inches - text formatting line height control
  210. TextPointSize inches s-1fIsee belowfPs+1 size to use in setting text
  211. .fi
  212. .PP
  213. The configuration parameters are explained below.
  214. Most parameters correspond to a command line option.
  215. Parameter values identified above as
  216. .I inches
  217. are converted according to the following conventions
  218. (where ``#.##'' is a decimal number):
  219. .RS
  220. .nf
  221. .sp .5
  222. .ta w'#.##sp    'u
  223. #.##bp big point (1in = 72bp)
  224. #.##cc cicero (1cc = 12dd)
  225. #.##cm centimeter
  226. #.##dd didot point (1157dd = 1238pt)
  227. #.##in inch
  228. #.##mm millimeter (10mm = 1cm)
  229. #.##pc pica (1pc = 12pt)
  230. #.##pt point (72.27pt = 1in)
  231. #.##sp scaled point (65536sp = 1pt)
  232. .RE
  233. .fi
  234. .LP
  235. Unit names can be upper or lower case but no white space
  236. is permitted between the number and the unit.
  237. Values specified with no unit are interpreted as big points.
  238. .TP 15
  239. .B Columns
  240. The number of columns to set text in.
  241. (Equivalent to the
  242. .B -m
  243. option.)
  244. .TP 15
  245. .B FontMap
  246. The directory or directories where the ghostscript Fontmap file(s)
  247. are located; multiple paths are separated by a colon (":"). The
  248. Fontmap table allows the translation of the descriptive name of the
  249. font (as used by the
  250. .IR TextFont
  251. parameter) to the ghostscript font filenames. Setting the value to ""
  252. (zero length string) disables this translation and provides functionality
  253. with RIPs other than ghostscript.
  254. .TP 15
  255. .B FontPath
  256. The path where Adobe Font Metric (s-1AFMs+1) files are
  257. located; by default ${FONTPATH}. (Equivalent to the
  258. .B -F
  259. option.)
  260. .TP 15
  261. .B GaudyHeaders
  262. Control whether or not to use a gaudy-style page header.
  263. (Equivalent to the
  264. .B -G
  265. option.)
  266. .TP 15
  267. .B ISO8859
  268. Control the use of
  269. .SM "ISO 8859-1"
  270. encoding in the generated *(Ps
  271. (Equivalent to the
  272. .B -D
  273. option.)
  274. .TP 15
  275. .B LineWrap
  276. Control whether long text lines are wrapper or truncated at the
  277. right hand margin.
  278. (Equivalent to the
  279. .B -c
  280. option.)
  281. .TP 15
  282. .B Orientation
  283. Control whether pages are oriented horizontally (``landscape'')
  284. or vertically (``portrait'').
  285. (Equivalent to the
  286. .B -r
  287. and
  288. .B -R
  289. options.)
  290. .TP 15
  291. .B OutlineMargin
  292. Control whether columns of text have a line drawn around them and
  293. the width of the line.
  294. Setting this parameter to 0 disables outlines.
  295. (Equivalent to the 
  296. .B -o
  297. option.)
  298. .TP 15
  299. .B PageCollation
  300. Control whether the output file has pages collated in the same
  301. order as the input file (``forward'') or in reverse order (``reverse).
  302. (Equivalent to the
  303. .B -U
  304. option.)
  305. .TP 15
  306. .B PageHeaders
  307. Control whether page headers are generated.
  308. (Equivalent to the
  309. .B -B
  310. option.)
  311. .TP 15
  312. .B PageHeight
  313. Set the output page height in inches (in inches).
  314. .TP 15
  315. .B PageMargins
  316. Set the output page dimensions.
  317. Dimensions are specified as string of the form:
  318. ``fBl=fP#,fBr=fP#,fBt=fP#,fBb=fP#''
  319. where 
  320. .B l
  321. indicates the left margin,
  322. .B r
  323. indicates the right margin,
  324. .B t
  325. indicates the top margin,
  326. .B b
  327. indicates the bottom margin, and
  328. numbers are interpreted as 
  329. .IR inches .
  330. (Equivalent to the 
  331. .B -M
  332. option.)
  333. .TP 15
  334. .B PageSize
  335. Set the output page dimensions by name.
  336. (Equivalent to the
  337. .B -s
  338. option.)
  339. .TP 15
  340. .B PageWidth
  341. Set the output page width in inches (in inches).
  342. .TP 15
  343. .B TabStop
  344. Set the tab stop distance; in characters.
  345. .TP 15
  346. .B TextFont
  347. Set the descriptive name of font to use for setting text.
  348. (Equivalent to the
  349. .B -f
  350. option.)
  351. .TP 15
  352. .B TextLineHeight
  353. Set the vertical text line height and spacing.
  354. (Equivalent to the
  355. .B -V
  356. option.)
  357. .TP 15
  358. .B TextPointSize
  359. Set the point size to use in setting text.
  360. (Equivalent to the
  361. .B -p
  362. option.)
  363. .SH NOTES
  364. If
  365. .I textfmt
  366. is unable to locate font metric information for a font, then it
  367. will use a fixed-width metric that is 60% of the text point size;
  368. this metric will almost certainly result
  369. in incorrectly formatted *(Ps.
  370. .PP
  371. .I textfmt
  372. is distantly related to the
  373. .I lptops
  374. program written by Don Beebe.
  375. .SH FILES
  376. .ta w'${LIBDATA}/pagesizes    'u
  377. .nf
  378. ${LIBDATA}/hyla.conf system-wide configuration file
  379. ~/.hylarc per-user configuration file
  380. ${LIBDATA}/pagesizes page size database
  381. ${FONTPATH}   font metric files
  382. .fi
  383. .SH "SEE ALSO"
  384. .IR hylafax-client (1),
  385. .IR sendfax (1),
  386. .IR pagesizes (${MANNUM4_5})