[Image-SIG] PIL TIFF to PDF conversion

Larry Bates lbates@swamisoft.com
Fri, 19 Jul 2002 11:00:49 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C22F13.8A7988E0
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

I'm having problems with a very simple application (see below):

#----------------------------
from PIL import Image
#
# Read in 8.5 x 11 inch TIF invoice scanned at 100 dpi
#
im=3DImage.open("c:\\test\\invoice.tif")
#
# Save it in PDF format
#
im.save("c:\\test\\invoice.pdf","PDF")
#----------------------------

The problem is that the PDF that is output by PIL is
11.81 x 15.28 inches in size.  If I open the TIF
file in PhotoShop it shows 100 dpi, 8.5 x 11 inches.

I don't understand what is happening or why.

Thanks in advance for any assistance.

Regards,
Larry Bates




------=_NextPart_000_0007_01C22F13.8A7988E0
Content-Type: text/html;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>I'm having problems with a very simple application =
(see=20
below):</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>#----------------------------</FONT></DIV>
<DIV><FONT size=3D2>from PIL import Image</FONT></DIV>
<DIV><FONT size=3D2>#</FONT></DIV>
<DIV><FONT size=3D2># Read in 8.5 x 11 inch&nbsp;TIF invoice scanned at =
100=20
dpi</FONT></DIV>
<DIV><FONT size=3D2>#</FONT></DIV>
<DIV><FONT =
size=3D2>im=3DImage.open("c:\\test\\invoice.tif")</FONT></DIV>
<DIV><FONT size=3D2>#</FONT></DIV>
<DIV><FONT size=3D2># Save it in PDF format</FONT></DIV>
<DIV><FONT size=3D2>#</FONT></DIV>
<DIV><FONT size=3D2>im.save("c:\\test\\invoice.pdf","PDF")</FONT></DIV>
<DIV><FONT size=3D2>#----------------------------</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>The problem is that the PDF that is output by PIL=20
is</FONT></DIV>
<DIV><FONT size=3D2>11.81 x 15.28 inches in size.&nbsp; If I open the=20
TIF</FONT></DIV>
<DIV><FONT size=3D2>file in PhotoShop it shows 100 dpi, 8.5 x 11=20
inches.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>I don't understand what is happening or =
why.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Thanks in advance for any assistance.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>Regards,</FONT></DIV>
<DIV><FONT size=3D2>Larry Bates</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0007_01C22F13.8A7988E0--