Outlook Truncates Small PDF Files

S

Scott S.

Hi All,

Recently I found that certain PDF produced by Crystal (and the .NET Crystal
Engine) were being corrupted when e-mailed by Outloook. Upon closer
inspection I found that if the PDF was a single page, used /FLATE encoding
for that page and only had one /FLATE stream that was less than about 2600
characters, outlook would truncate the file while it was being sent.

After much stuffing around writing code to expand the /FLATE stream and
write it back as plain text I found that if the file has an image in it, it
will be transmitted by Outlook without truncation. So the fix is to stick a
blank image into the report (if you don't have other images in the report
already). The image can't be seen, but it stops Outlook from Mangling the
file.

Cheers,

Scott S.
 
B

Brian Tillman

Scott S. said:
Recently I found that certain PDF produced by Crystal (and the .NET
Crystal Engine) were being corrupted when e-mailed by Outloook. Upon
closer inspection I found that if the PDF was a single page, used
/FLATE encoding for that page and only had one /FLATE stream that was
less than about 2600 characters, outlook would truncate the file
while it was being sent.

After much stuffing around writing code to expand the /FLATE stream
and write it back as plain text I found that if the file has an image
in it, it will be transmitted by Outlook without truncation. So the
fix is to stick a blank image into the report (if you don't have
other images in the report already). The image can't be seen, but it
stops Outlook from Mangling the file.

How do you know it is actually Outlook doing the mangling?
 
S

Scott S.

What else would it be? The mail server? Sure it could be that too - in
which case it's Exchange, however I have doubts that my ISP uses exchange (I
know my work account is exchange). I also have read the Eudora doesn't have
the same problem.
 
B

Brian Tillman

Scott S. said:
What else would it be? The mail server? Sure it could be that too -
in which case it's Exchange, however I have doubts that my ISP uses
exchange (I know my work account is exchange). I also have read the
Eudora doesn't have the same problem.

Well, we send PDF files, both large and small, all the time using Outlook
and none are truncated. So, patently, it's not a systemic problem with
Outlook. So, yes, it could be the server, it could be a program scanning
mail, it could even be the way Crystal writes the file attribute metadata.
You'll have to perform additional testing to locate the root cause rather
than simply assuming "it's Outlook's problem".
 
S

Scott S.

What do you create the PDF's with? What is the encoding method used? Do
they have bitmaps in them or are they simply plain text? Are they single
stream PDF's?

My ISP is using a server other than Exchange. I have sent it throught their
server (only), through our Exchange server (only) and through both. I have
sent it through our server with and without Antivirus. If I send the file
using OWA it doesn't get corrupted (and have read that Eudora works or
sending the e-mail with outlook using plain text and UUENCODE also works).
 
B

Brian Tillman

Scott S. said:
What do you create the PDF's with?

A number of tools, but the main two are Adbobe Acrobat and our multifunction
copier/printers with which you can scan a document, convert it to a PDF, and
mail it your mailbox
What is the encoding method used?

MIME Base64.
Do they have bitmaps in them or are they simply plain text?

Sometimes one, sometimes the other, and sometimes both
Are they single stream PDF's?

You got me on this. I don't even know what it means.
My ISP is using a server other than Exchange. I have sent it
throught their server (only), through our Exchange server (only) and
through both. I have sent it through our server with and without
Antivirus. If I send the file using OWA it doesn't get corrupted
(and have read that Eudora works or sending the e-mail with outlook
using plain text and UUENCODE also works).

I don't know what else to say, other than there seems to be something in
your particular environment because otherwise more of us would be
experiencing the problem as well.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top