# jpeg2pdf – Convert JPEG Files to PDF

Version: 2.1

Part of DaVince Tools

Last Modified: September 25, 2002

Command Syntax

Description

New Features / Changes

Additional Information

About DaVince Tools

## Command Syntax

Refer to the "DaVince Tools" Converters page for a description of the command line syntax for all converters.

## Description

"jpeg2pdf" is a command line program that converts JPEG files to PDF (Portable Document Format) files (for a Windows interface to this program, see wdavince). JPEG is a file standard used primarily for photographic images. The program takes the raw image data from the JPEG file "as is" and puts it in a PDF wrapper. This analogous to removing a letter from a letter size envelope and placing it in a business size envelope. The original image data is unaltered, so no data compression of the image is done (although the page description can be compressed using the "compression" option in the jpeg2pdf.ini file). Since the image is transferred "as is" from the JPEG file to the PDF file, this results in a fast conversion. The key features of this program are:

- JPEG file formats JFIF and ITU T.81 supported
- Single and multi-page file support
- Bookmark support
- Convert many JPEG files to one PDF (many to one), create a PDF file for each specified JPEG file (one to one), or create a PDF file for each JPEG subdirectory specified (many to few)
- RGB, Grayscale and CMYK JPEG files supported
- Quick conversion of data by utilizing existing compressed image data
- Individual filenames with wildcard support and/or an entire directory may be specified for conversion
- Specify files or directories to convert either via the command line or a command file
- Large file support (1,000+ pages)
- Creates a version 1.2 PDF file with a unique file ID in trailer

The height, width and resolution information embedded in the JPEG file are used to determine the physical page size. For example, an image 2,544 pixels wide and 3,287 pixels long and scanned at 300 DPI results in a PDF page size of 2,544/300 by 3,287/300, or 8.48 inches wide by 10.96 inches long. The resulting page size may not match a standard paper size, however, this is not a problem for viewers like Adobe Acrobat. The advantage to this method is that a multiple page conversion can contain images scanned at different sizes. This allows, for example, a converted PDF file to contain both U.S. letter and legal size pages, as well as differing European sizes (A1, A2, etc.) or even a combination of the two.

The screen output can be redirected to a file adding the DOS syntax ">filename" to the end of the command line. This can be used to redirect output to a log file. The program returns an error code of 1 when a fatal error occurs, used in batch programs to test the success of the program.

The initialization file and the use of profiles is described in the "DaVince Tools" Converters page.

## Common Profile Settings

Refer to the "DaVince Tools" Converters page for a description of the common profile settings.

Converter Specific Settings

This tables describes jpeg2pdf.ini settings that are unique to this converter:

Option | Data Type | Description
DefaultDPI | Number (in dpi) | Default resolution (in dots per inch) to use if the resolution is not specified in the JPEG file. Default value is 150.

## New Features / Changes:

A list of new features and changes, along with a version history, can be found in the release notes.

## Additional Information:

Any DaVince Tool product that creates a PDF must create an intermediate file prior to writing the PDF file. The filename of this intermediate file begins with "tmps" and appears in the directory pointed to by the environment variable "TMP". If this environment does not exist, then the temporary file is written in the current directory. The intermediate file exists only during the execution of the program.

##

## About DaVince Tools:

Visit the DaVince Tools web site at http://www.davince.com for the latest version of this software and the latest documentation. DaVince Tools is shareware and software registration is urged if you find these programs useful. You can register the software on-line at http://www.davince.com.

DaVince Tools

was written in C++ using the DaVince Class Library, written by the same author as this program. The DaVince Class Library is a C++ library for developing PDF and TIFF applications. Contact the author at info@davince.com for more information on the availability of the class library.