hp2xx使用

发布时间 2023-10-25 23:37:47作者: 槑孒

hp2xx - 转换为某些矢量和光栅格式的 HPGL 转换器

下载安装

https://www.gnu.org/software/hp2xx/
https://gnuwin32.sourceforge.net/packages/hp2xx.htm

用法

https://www.math.utah.edu/docs/info/hp2xxinf_1.html#SEC1

hp2xx [-选项] [hpgl 文件]

OPTION 概要

选项格式默认说明


常规选项:
-c char * 11111111 笔颜色。 有效:1 到 8 位数字,每个数字为 0-7 => 0=关闭,1=黑色,2=红色,3=绿色,4=蓝色,5=青色,6=洋红色,7=黄色
-f char * "" 输出文件的名称。 "" = 自动,"-" = 标准输出
-l char * "" 可选日志文件的名称
-m char * pre 模式。 有效(有些是编译时选项):mf、cad、dxf、em、emf、eps、escp2、jpg、gpt、hpgl、rgip、pcl、pcx、pic、img、pbm、png、pre、svg、tiff、pdf、nc
-p char * 11111111 Pensize(s) [dots](默认),[1/10 mm](mf,ps)。
有效:1-8 的 0 到 9 位数字(或字符 AZ 表示宽度超过 0.9 毫米)每个。
-P int 0:0 选定的页面范围 (m:n) (0 = 0:0 = 所有页面)
-q 关闭安静模式。
-r double 0.0 旋转角度 [度]。
-s char * hp2xx.swp 交换文件名

尺寸控制:
-双 1.0 纵横因数。 有效:> 0.0
-h 双 200 图片高度 [mm]
-w 双 200 图片宽度 [mm]
-x double - 预设 HPGL 坐标范围的 xmin 值
-X double - 预设 HPGL 坐标范围的 xmax 值
-y double - 预设 HPGL 坐标范围的 ymin 值
-Y double - 预设 HPGL 坐标范围的 ymax 值
-z 双 1.0 Z 啮合(工作深度)(仅用于 nc 输出)
-Z double -1.0 Z 回退深度(仅用于 nc 输出)
-t 关闭真实大小模式。 抑制 -a -h -w 的影响

HPGL 处理控制:
-n off 不填充多边形; 改为绘制轮廓
-N off 忽略 PS 命令,根据需要计算绘图大小
-e int 0 按给定数量扩展 IW 裁剪限制
-M int 0 将 0 号笔命令重新映射到给定的笔

光栅格式控件:
-d int 75 DPI 值(x 或 x&y 两者)
-D int 75 DPI 值(仅 y)

仅限 PCL:
-F off 在图形数据后发送 FormFeed
-i off 预初始化打印机
-S int 0 (Deskjet) 特殊命令:0=off,1=b/w,3=CMY,4=CMYK
-d(见上文)仅有效 300、150、100、75
-D(见上文)对 PCL 无效!

EPS、PCL 和一些预览:
-o 双 0.0 x 图片偏移 [mm](左边距)
-O 双 0.0 y 偏移 [mm] 图片(上边距)
-C 修改 -o -O 使图片在 -w -h 框架内居中

仅 TIFF:
-S int 0 压缩:0/1=off,2=RLE,3=G3FAX,4=G4FAX,
6=OJPEG,7=JPEG,8=放气

在 PC 上预览 (DOS):
-V int 18 VGA 模式字节(十进制)


-H 显示帮助。

点击查看代码
hp2xx is free software and you are welcome to distribute copies of it
  under certain conditions. There is absolutely no warranty for hp2xx!
For full details, read file COPYING (shipped along with this package),
  or write to:          Free Software Foundation, Inc.
                        675 Mass Ave, Cambridge, MA 02139, USA

HP2xx:  A HPGL converter (xx = mf, eps, pcl, pcx, img ...)
        V 3.4.4  (03/06/22)   (c) 1991 - 1994 (V3.20) Heinz W. Werntges
                              (c) 1999 - 2003 Martin Kroeker
Usage:  hp2xx [options] [file1 [file2 ...]]
        Unix: Filter usage (.. | hp2xx -q -f- [options] | ..) ok

Press <Return> to continue ...


Opt fmt   defaults      Comment:
---------------------------------------------------------------------------
-m strg   pre           Mode. Valid mode strings for this particular binary are:
                        cad,dxf,em,emf,emp,epic,eps,esc2,fig,gpt,hpgl,img,jpg,mf,nc,pbm,pcl,pcx,pac,pic,pdf,png,pre,rgip,svg,tiff
-n        off           no filling of polygons (ignore FP commands)
-N        off           no honoring of papersize (PS) requests
                         (plotsize calculated from data instead)
-M int                  remap all drawing commands using pen 0 to this pen
-f strg   (auto gen.)   Name of output file ('-' = to stdout)
-l strg   (stderr)      Name of log file
-p strg   11111111      Pensize(s) of pen 1 to 8 (in 1/10 mm).
                        "strg" must consist of 1 to 8 digits '0'-'9'
                        first digit = pen1 ... last digit = pen 8
                        (default settings shown)
-c strg   12345671      Pen color(s) (default settings shown).
                        0 = off, 1 = black, 2 = red, 3 = green, 4 = blue,
                        5 = cyan, 6 = magenta, 7 = yellow
-P n:n    0:0           Page range (0:0 = all pages).
-q        off           Quiet mode (no diagnostics)
-r float  0.0           Rotation angle [deg]. -r90 = landscape
-s strg   hp2xx.swp     Name of swap file

Press <Return> to continue ...


Bitmap controls:
-d int    75            DPI value for x or x&y, if -D unused.
-D int    75            DPI value for y ONLY
-e int    0             Extra clipping space

PCL-exclusive options:
-i         off  Pre-initialize printer
-I         off  Initialize using PCL3GUI commands
-F         off  Send a FormFeed at end
-S int     0    Use Deskjet special commands (0=off, 1=B/W, 3=CMY, 4=CMYK)
NOTE:           Only valid for -d: 300/150/100/75; -D invalid!

PCL / PostScript / Preview options:
-o float   0.0  X offset [mm] of picture
-O float   0.0  Y offset [mm] of picture
-C              Fit picture into center of (-a/-h/-w) rectangle

Tiff-exclusive options:
-S int     0    Use Tiff Compression Format (0/1=None, 2=RLE, 3=G3Fax, 4=G4Fax, 5=LZW, 6=OJpeg, 7=Jpeg, 8=Deflate)

Press <Return> to continue ...


DXF-exclusive options:
-S int     0    Map pens to DXF colors (0=No mapping, 1=use pen no., 2=use width*10 , 3=map widths <0.2 to 1, <0.3 to 2,0.4 to 3 , above 0.4 to 4 )

Size controls:
-a float   1.0  Aspect factor (x/y correction). Valid: > 0.0
-h float 200.0  Height [mm] of picture
-w float 200.0  Width  [mm] of picture
-t         off  Show true HPGL size. Disables -a -h -w !
-H float 33600.0        Hardware X range [1/40 mm] of device
-W float 47520.0        Hardware Y range [1/40 mm] of device
-x float   -    Manual HPGL-coord range presetting: x0
-X float   -    Manual HPGL-coord range presetting: x1
-y float   -    Manual HPGL-coord range presetting: y0
-Y float   -    Manual HPGL-coord range presetting: y1
-z float  -1.0  (3d nc output only) Z engage depth
-Z float   1.0  (3d nc output only) Z retract depth

Press <Return> to continue ...

Corresponding long options:

hp2xx   [--mode] [--colors] [--pensizes] [--pages] [--quiet]
        [--nofill] [--no_ps] [--mapzero]
        [--width] [--height] [--aspectfactor] [--truesize]
        [--x0] [--x1] [--y0] [--y1]
        [--xoffset] [--yoffset] [--center]
        [--DPI] [--DPI_x] [--DPI_y] [--extraclip]
        [--outfile] [--logfile] [--swapfile]
        [--PCL_formfeed] [--PCL_init] [--PCL_Deskjet] [--PCL_PCL3GUI]
        [--help] [--version]