﻿Image2PDF - packer plugin for Total Commander
Version 2.2.0 (2026-11-01)

Copyright (C) 2026 Andrei Piasetski
License: freeware, free for private and business use (see LICENSE.txt)
Plugin page: https://totalcmd.net/plugins/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.
 * Optional text recognition (OCR) with the engine built into Windows 10
   and 11: an invisible text layer makes the PDF searchable.
 * 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.

It also works the other way round: Ctrl+PgDn on any PDF file lists the
images inside it like the files of an archive, together with its text and
a picture of every page, and F5 copies them out, JPEG images byte for byte
(see OPENING A PDF below).


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, and Ctrl+PgDn opens it in the plugin.

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". The
settings are on the Settings tab; the About tab shows the version, the
licence and a link to the plugin page.

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).

Text recognition (off by default)
 * Make the PDF searchable (OCR) - recognises the text of every page with
                       the OCR engine built into Windows 10 and 11 and
                       puts it on the page as an invisible layer, exactly
                       over the words on the image. PDF viewers can then
                       search the document and copy its text. The images
                       themselves are not changed. About half a second
                       per page.
 * Text language     - Windows languages: every language that has text
                       recognition installed in Windows (for example
                       English and Russian); each page gets the one that
                       fits. Or choose one language.
   Recognition comes with the Windows display languages. To add one, open
   Windows Settings > Time & language > Language, add the language, and
   in its options install "Optical character recognition". If the chosen
   language is missing, the plugin asks whether to pack without text.

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. TIFF pages Windows cannot read itself
   (JBIG, YCbCr with subsampled colour) are decoded by the plugin; JPEG 2000
   and CCITT fax (Group 3 and 4) pages in a TIFF are embedded as they are.
 * 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.


OPENING A PDF (EXTRACTING IMAGES, TEXT AND PAGES)
-------------------------------------------------
Select a PDF file and press Ctrl+PgDn: Total Commander lists the images
inside it like the files of an archive, its text as Text.txt and a picture
of every page in the folder Pages-to-images. Copy them out with F5, view
one with F3, or unpack all with Alt+F9. Enter still opens your PDF viewer.

 * Works with any PDF, not only those made by Image2PDF.
 * JPEG images are extracted byte for byte, exactly as they were stored in
   the PDF; for a scanned PDF these are usually the original scans.
 * JPEG 2000 images are saved unchanged too, as .jp2 (or .j2k).
 * Black-and-white scans with fax compression (CCITT Group 4) are saved as
   TIFF with their original data; the other fax variants are decoded and
   saved as PNG.
 * All other images (Flate, LZW, RunLength or uncompressed; grayscale, RGB,
   CMYK, palette, 1 to 16 bits) are saved as lossless PNG. Transparency
   (soft masks) is kept; CMYK is converted to RGB.
 * Names: "Page 001.jpg", or "Page 001-1.jpg", "Page 001-2.png" when a page
   holds several images. An image used on several pages is listed once, at
   its first page.
 * Text.txt holds the text of every page, in UTF-8, with a heading per
   page: the ordinary text of documents, invoices and the like, filled-in
   form fields, and the hidden text layer of a searchable scan (made by
   Image2PDF or another OCR program). It is listed when the PDF has any
   text. Text drawn as pictures or outlines cannot be read; a scan without
   a text layer has none.
 * Pages-to-images\Page 001.png, Page 002.png, ...: each page as Windows
   draws it, at 150 dpi (an A4 page becomes 1242 x 1754 pixels), on a white
   background. The pictures are made when they are copied or viewed, about
   a tenth of a second per page, so the sizes shown in the list are
   estimates. This uses the PDF engine built into Windows 10 and 11; PDFs
   that Windows cannot open (for example with AES-256 revision 6
   encryption, or some damaged files) are listed without the
   Pages-to-images folder. Settings in image2pdf.ini (section [image2pdf],
   no dialog setting): RenderDpi=150 sets the resolution (30-600),
   RenderPages=0 hides the folder.
 * Images are found in the page resources and in the forms the pages use.
   Soft masks are merged into their image, not listed separately.
 * Encrypted PDFs that open without a password (with only "permissions"
   restrictions) are read: RC4, AES-128 and AES-256. PDFs that ask for a
   password to open are not.
 * Damaged PDFs (wrong cross-reference table, cut-off files) are repaired as
   far as possible.
 * Sizes in the list are exact for JPEG and JPEG 2000 and estimated for the
   other formats.

Not extracted: JBIG2 images (no common file format can hold them), inline
images (small images stored inside the page content) and images used only
in annotations or patterns.


LIMITATIONS
-----------
 * 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.
 * Text recognition needs Windows 10 or later. It reads printed text;
   handwriting and very small or blurred print are recognised poorly.
 * The page pictures (the Pages-to-images folder when a PDF is opened)
   need Windows 10 or later; on older Windows the folder is not listed.
   Images and Text.txt work on every Windows version.
 * Images larger than 2 GB are not supported. When extracting, each decoded
   image must be under 1 GB, and very large PDFs (more than about 1 GB) may
   not open in 32-bit Total Commander.


VERSION HISTORY
---------------
2.2.0 TIFF pages Windows cannot decode no longer stop packing: JBIG and
     YCbCr pages with subsampled colour are decoded by the plugin, JPEG 2000
     pages are embedded unchanged (Windows showed them as black). An error
     in a multi-page TIFF names the page. Fax-compressed TIFF pages (CCITT
     Group 3 and 4) go into the PDF unchanged, which keeps scans smaller.
     Ctrl+PgDn now shows something for every PDF: Text.txt holds all the
     text (no longer only the hidden layer of scans), and the folder
     Pages-to-images holds a picture of every page (Windows 10 and later).
     Fixed a crash on some damaged PDFs with object streams.
2.1.0.2 Image2PDF is now freeware: still free for everyone, private and
     business use, but no longer open source. Versions up to 2.1.0.1 stay
     under the GNU GPL.
2.1.0.1 The settings window has two tabs, Settings and About; About shows
     the version, copyright, licence and a link to the plugin page for bug
     reports and feature requests.
2.1.0 Text recognition (OCR) with the engine built into Windows: an
     invisible text layer makes the PDF searchable. Ctrl+PgDn on a
     searchable PDF also lists its text layer as Text.txt.
2.0.0 Opens PDF files like an archive: Ctrl+PgDn on any PDF lists the
     images inside it and F5 extracts them - JPEG and JPEG 2000 byte for
     byte, CCITT fax scans as TIFF, everything else as PNG. Reads object
     streams, encrypted PDFs that open without a password (RC4, AES-128,
     AES-256) and repairs damaged files.
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
-------
Image2PDF is freeware: you may use it free of charge, for private and for
business purposes, on any number of computers, and pass on the unchanged
plugin package free of charge. The plugin is provided "as is", without any
warranty. The full terms are in LICENSE.txt.
