From 8c00186b082a08c7655cd51edaa59d9fe071fa23 Mon Sep 17 00:00:00 2001 From: Vitor Henrique <87824454+vitorhcl@users.noreply.github.com> Date: Wed, 14 Feb 2024 17:24:02 -0300 Subject: [PATCH] img2pdf: improve page description and placeholders (#12245) Co-authored-by: K.B.Dharun Krishna Co-authored-by: Juri Dispan --- pages/common/img2pdf.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/pages/common/img2pdf.md b/pages/common/img2pdf.md index 7ffbfa26b..07487b392 100644 --- a/pages/common/img2pdf.md +++ b/pages/common/img2pdf.md @@ -1,24 +1,25 @@ # img2pdf -> Command-line lossless converter of raster images to PDF. +> Losslessly convert raster images to a PDF file. +> Some supported image formats are: GIF, JPEG, JPEG2000, PNG, GIF and TIFF. > More information: . - Convert one or more images to a single PDF, each image being on its own page: -`img2pdf {{path/to/image1.jpg path/to/image2.jpg ...}} --output {{path/to/file.pdf}}` +`img2pdf {{path/to/image1.ext path/to/image2.ext ...}} --output {{path/to/file.pdf}}` - Convert only the first frame of a multi-frame image to PDF: `img2pdf {{path/to/file.gif}} --first-frame-only --output {{path/to/file.pdf}}` -- Auto orient the image, use a page size of A4 in landscape mode, and set a border of 2cm horizontally and 5.1cm vertically: +- Auto orient the image, use a specific page size in landscape mode, and set a border of specific sizes horizontally and vertically: -`img2pdf {{path/to/file.jpg}} --auto-orient --pagesize {{A4^T}} --border {{2cm}}:{{5.1cm}} --output {{path/to/file.pdf}}` +`img2pdf {{path/to/image.ext}} --auto-orient --pagesize {{A4^T}} --border {{2cm}}:{{5.1cm}} --output {{path/to/file.pdf}}` -- Shrink only larger images to a 10cm by 15cm rectangle inside a 30x20cm page: +- Shrink only larger images to a rectangle of specified dimensions inside a page with a specific size: -`img2pdf {{path/to/file.tiff}} --pagesize {{30cm}}x{{20cm}} --imgsize {{10cm}}x{{15cm}} --fit {{shrink}} --output {{path/to/file.pdf}}` +`img2pdf {{path/to/image.ext}} --pagesize {{30cm}}x{{20cm}} --imgsize {{10cm}}x{{15cm}} --fit {{shrink}} --output {{path/to/file.pdf}}` - Convert an image to PDF, and specify metadata for the resulting file: -`img2pdf {{path/to/file.png}} --title {{title}} --author {{author}} --creationdate {{1970-01-31}} --keywords {{keyword1 keyword2}} --subject {{subject}} --output {{path/to/file.pdf}}` +`img2pdf {{path/to/image.ext}} --title {{title}} --author {{author}} --creationdate {{1970-01-31}} --keywords {{keyword1 keyword2}} --subject {{subject}} --output {{path/to/file.pdf}}`