PDF Woes

Julian Field mailscanner at ecs.soton.ac.uk
Thu May 27 15:28:43 IST 2004


At 14:30 27/05/2004, you wrote:
> > -----Original Message-----
> > From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK] On
> > Behalf Of Julian Field
> > Sent: Thursday, 27 May 2004 6:01 PM
> > To: MAILSCANNER at JISCMAIL.AC.UK
> > Subject: Re: PDF Woes
> >
> > The problem is caused by the fact that you should never send PDF docs as
> > quoted-printable. Quoted-printable is designed for files that are mostly
> > text, and in which the end of line sequence doesn't really matter.
> > MailScanner legitimately takes the attachment apart from the message, and
> > then has to rebuild the attachment on the message's way out. Following the
> > allowable end-of-line sequences in quoted-printable, a validly rebuilds
> > the
> > attachment. Unfortunately this ends up changing the end-of-line sequenence
> > on one or two of the lines, which breaks the PDF file.
>
>Hi Julian,
>
>Outlook 2003 when sending HTML messages (default settings) has this issue. I
>know this is not really your fault, however is there any way at all that
>some kind of patch or workaround can be devised?  Unfortunately I can't see
>Microsoft releasing any kind of fix too soon.
>
>We have several large clients all of whom want messages signed and use
>Outlook 2003 for PDF's.  We've had to ask them to only send PDF's in plain
>text emails in order to avoid the issue.

Here is the start of a PDF file before Outlook has got anywhere near it:
0000000   %   P   D   F   -   1   .   3  \r   %   â   ã   Ï   Ó  \r  \n
0000020   1   3   1   7   4       0       o   b   j  \r
And when it has been sent to a copy of sendmail (but before sendmail has 
done anything with the data at all)
%
0000660   P   D   F   -   1   .   3   =   0   D   %   =   E   2   =   E
0000700   3   =   C   F   =   D   3  \n   1   3   1   7   4       0
0000720   o   b   j   =   0   D
The first \r gets correctly turned into =0D. The \r\n is converted into \n.
So Outlook has already screwed the file by converting it into 
quoted-printable. When these lines are put back together by MailScanner, if 
it has had to rebuild the body of the message, it packs them according to 
the quoted-printable spec, which leaves them in a state where Acrobat can't 
read them.

What I will try is have MailScanner rebuild text/pdf and application/pdf 
(and the x- versions) as Base64, to see if that helps. It can't help 
Outlook's corruption, which has already happened, but it may avoid making 
the situation any worse.
-- 
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support

PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654

-------------------------- MailScanner list ----------------------
To leave, send    leave mailscanner    to jiscmail at jiscmail.ac.uk
Before posting, please see the Most Asked Questions at
http://www.mailscanner.biz/maq/     and the archives at
http://www.jiscmail.ac.uk/lists/mailscanner.html




More information about the MailScanner mailing list