Linux command
sam2p 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Convert image to PDF
sam2p [input.png] [output.pdf]
Convert to EPS
sam2p [input.png] [output.eps]
Convert with ZIP compression
sam2p -c:zip [input.png] [output.pdf]
Convert with JPEG compression
sam2p -c:jpeg [input.png] [output.pdf]
Scale image to fit page
sam2p -e:scale [input.png] [output.pdf]
Set page margins
sam2p -m:1cm [input.png] [output.pdf]
说明
sam2p converts raster (bitmap) images to Adobe PostScript or PDF files with minimal output size. It gives full control over standards-compliance, compression, and bit depths. Supported input formats include PNM, PBM, PGM, PPM, XPM, GIF, LBM, TGA, PCX, JPEG, TIFF, PNG, BMP, PS, EPS, and PDF. Output formats include PS (levels 1-3), EPS, PDF, and many raster formats.
参数
- -c:_method_
- Compression method: none, zip, lzw, rle, fax, dct, jpeg.
- -1, -ps:1
- Produce PostScript Level 1 output.
- -2, -ps:2
- Produce PostScript Level 2 output (default for PS).
- -3, -ps:3
- Produce PostScript Level 3 output.
- -pdf:b2
- Produce PDF 1.2 with inline image (default for PDF).
- -e:scale
- Scale image to fit page.
- -e:rotate
- Scale and rotate image to fit page.
- -m:_dimen_
- Set all page margins (e.g., -m:1cm, -m:0.5in).
- -m:_spec_:_dimen_
- Set specific margin: l (left), r (right), t (top), b (bottom).
- -m:dpi:_res_
- Set output resolution.
- -j:quiet
- Suppress warnings, show only errors.
FAQ
What is the sam2p command used for?
sam2p converts raster (bitmap) images to Adobe PostScript or PDF files with minimal output size. It gives full control over standards-compliance, compression, and bit depths. Supported input formats include PNM, PBM, PGM, PPM, XPM, GIF, LBM, TGA, PCX, JPEG, TIFF, PNG, BMP, PS, EPS, and PDF. Output formats include PS (levels 1-3), EPS, PDF, and many raster formats.
How do I run a basic sam2p example?
Run `sam2p [input.png] [output.pdf]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -c:_method_ do in sam2p?
Compression method: none, zip, lzw, rle, fax, dct, jpeg.