﻿Image2PDF - packer plugin for Total Commander
Version 1.6 (2026-10-30)

Copyright (C) 2026 Andrei Piasetski
License: GNU General Public License, version 3 or later (see LICENSE.txt)
Source code: https://github.com/apiasetski/Image2PDF


WHAT IT DOES
------------
Packs the image files selected in Total Commander into one PDF file,
one image per page. Select the images, press Alt+F5 (Pack files),
choose "pdf" as the packer and press OK.

 * JPEG images are embedded byte for byte: no recompression, no quality loss.
 * PNG images are embedded losslessly, including transparency (alpha channel).
 * BMP, GIF, TIFF (every page), WebP, HEIC, AVIF and other formats Windows
   can open are converted too.
 * Pages follow the natural name order (img2 before img10), also across
   selected subfolders; or the panel order, file date or date taken.
 * Page sizes A3, A4, A5, Letter, Legal or your own, with fit or fill.
 * Bookmarks for folders and files; title and author in the PDF.
 * Optional file size reduction for scans and phone photos.
 * Photos are turned upright using their EXIF orientation (can be switched off).
 * Files that are not images are skipped.
 * English and Russian interface; 32-bit and 64-bit Total Commander;
   no external libraries.


INSTALLATION
------------
Open the plugin archive in Total Commander (Enter on the zip file) and
confirm the installation prompt. Total Commander copies the plugin and
associates the "pdf" extension with it.

The plugin is registered as "hidden": Enter on an ordinary .pdf file still
opens your PDF viewer.

Updating: install the new archive the same way. Your settings are kept.


SETTINGS
--------
In the Pack files dialog (Alt+F5) choose "pdf" and click "Configure".

Page
 * Page size         - Original image size: every page is exactly as large
                       as its image. A3, A4, A5, Letter, Legal or Custom
                       (width x height in mm): the image is placed inside
                       the margin.
 * Resolution        - how many pixels make an inch, for "Original image
                       size" and for "Never enlarge small images".
 * Margin            - paper margin in millimetres.
 * Placement         - Fit inside the page: the whole image is visible.
                       Fill the page: the image covers the area inside the
                       margin and the overhanging part is cut off.
 * Alignment         - Centre, or Top (the free space goes to the bottom).
 * Always portrait   - every page keeps the portrait orientation. When not
                       ticked, the page turns for wide images.
 * Never enlarge small images - small images keep their size (at the
                       resolution above) instead of being scaled up.
 * Turn photos upright (EXIF).

Document
 * Page order        - Natural name order (img2 before img10); As sorted in
                       the panel; File date; or Date taken (EXIF, falling
                       back to the file date). The date orders sort within
                       each folder.
 * Bookmarks         - None; One per folder (each selected subfolder);
                       One per file; or Folders and files (files nested in
                       their folders).
 * Author            - written into the PDF. The title is the PDF's file
                       name.

File size (off by default, so nothing is recompressed unless you ask)
 * Reduce file size  - images drawn at a higher resolution than "Max.
                       resolution" are scaled down to it (measured at the
                       size they have on the page, so it matters most for
                       A4 and the other paper sizes). Photos are stored as
                       JPEG with the given quality; PNG, BMP, TIFF stay
                       lossless. Images that are already small enough and
                       need no colour change are left exactly as they are.
 * Colours           - Keep, Grayscale, or Black and white (1 bit per pixel,
                       a plain 50% threshold: good for text, not for photos).

Language: Automatic follows the Total Commander language (Russian if a
Russian language file is selected, otherwise English), or choose English
or Russian.

The settings are saved in image2pdf.ini in the plugin folder and apply to
every following pack.

Progress: the Total Commander progress window advances per page, also
inside multi-page TIFF files, and Cancel stops at the next page; nothing is
written in that case.


SUPPORTED IMAGES
----------------
Embedded as they are, without any conversion:
 * JPEG: baseline and progressive; grayscale, RGB and CMYK.
 * PNG: grayscale, RGB and palette images, all bit depths, with or without
   alpha channel (not interlaced).

Converted with the Windows Imaging Component (part of Windows):
 * BMP, GIF (first frame), ICO, TIFF (every page becomes a PDF page),
   interlaced PNG and the rarer JPEG variants - stored losslessly;
   black-and-white scans stay 1-bit.
 * WebP, HEIC, AVIF, JPEG XR and camera RAW - stored as JPEG (quality 90),
   since these formats are lossy already.
 * Transparency is kept.
 HEIC needs the "HEIF Image Extensions" and "HEVC Video Extensions" from the
 Microsoft Store, AVIF the "AV1 Video Extension", WebP on older Windows 10
 the "Webp Image Extensions". If a codec is missing, packing stops with a
 message naming the file.

Ignored: PNG palette transparency (tRNS), colour profiles and gamma.


LIMITATIONS
-----------
 * Pack only: the plugin cannot open, list or extract PDF files.
 * Pages cannot be added to an existing PDF. Packing onto a file name that
   already exists stops with a message; the existing file is not changed.
 * Images larger than 2 GB are not supported.


VERSION HISTORY
---------------
1.6  Page sizes A3, A5, Legal and custom; fill (crop), top alignment and
     "Never enlarge small images". Bookmarks for folders and files. Title
     and author. Optional file size reduction (resolution, JPEG quality,
     grayscale, black and white). Page order by panel, file date or date
     taken. Russian interface. Progress and Cancel inside multi-page TIFFs.
1.5  BMP, GIF, TIFF (multi-page), WebP, HEIC, AVIF and more, through the
     Windows Imaging Component. Interlaced PNG is supported now.
1.4  First public release under the GNU GPL. The package no longer contains
     a settings file, so updating keeps your settings.
1.3  Clear message when none of the selected files is a JPEG or PNG image.
1.2  Clear message when the target PDF already exists.
1.1  Settings window; "Always portrait" option for A4 and Letter.
1.0  First version.


LICENSE
-------
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option)
any later version.

This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
more details (LICENSE.txt).
