JPEG  to  PDF  File  Conversions


By Don Lancaster                                                                     Version 1.1 December 5, 1997
Copyright c. 1997 by Don Lancaster and Synergetics, Box 809, Thatcher AZ, 85552
(520) 428-4073. synergetics@tinaja.com All commercial rights and all electronic media
rights are *fully* reserved. Linking welcome. Reposting is expressly forbidden.

Further support on www.tinaja.com  


(The following is believed correct. Please report any errors or differing experiences.)

Many popular programs give you one or more methods to convert a JPEG image
into a PostScript .eps file. These include Illustrator, PhotoShop, Debabelizer, Transverter
Pro
, Image Alchemy, and others.

The Adobe Acrobat Distiller gives us a new, simple, and extremely flexible method of
converting JPEG to PDF. A short PostScript routine is used to read and filter a host
disk based JPEG file. This file is converted to an image and sent to distiller.

Here's a summary of the method, which leans heavily on Adobe Tech Note #5116
and Red Book section 4.10.3.

Assume you have a host resident JPEG file called barro.jpg. Assume further that this
file is 37 pixels wide and 34 pixels high and is in a directory of C:\Windows\Desktop\barro.

Create the following PostScript code using Word Pad or another editor. Or else include
this code in another PostScript proc...

     /Data {infile /DCTDecode filter} def    %  define a data source

The ImageMatrix is both confusing and tricky. ImageMatrix is what you need to get from
a unit square back to the JPEG pixel size.

A typical PostScript matrix is [ wide  climb  lean  high  xshift  yshift ]

The fourth element height is negative because JPEG images vertically in the opposite direction
of a PS image. The sixth element vertical offset repositions to the top rather than the bottom
of the image.

PostScript uses ImageMatrix backwards to get you from your JPEG size to a unit square.
Your usual translates, scales, and whatever then remap the unit square to your end size.

To complete the conversion, save your routine as an ACII text file. Then send the
PostScript routine to the Acrobat Distiller.

A PDF file should result with JPEG files properly imaged.

All sorts of options are possible. Such as saving JPEG images to string files, conversion to
patterns, or outputting ASCII85 over JPEG for non-transparent or 7-bit comm.


Copyright c. 1997 by Don Lancaster and Synergetics, Box 809, Thatcher AZ, 85552
(520) 428-4073. synergetics@tinaja.com All commercial rights and all electronic media
rights are *fully* reserved. Linking welcome. Reposting is expressly forbidden.
Further support on http://www.tinaja.com
Consulting services available via don@tinaja.com