Solved

Server 2008 R2 corrupting PDF when scheduled task emails

Posted on 2013-06-10
13
634 Views
Last Modified: 2013-06-16
Hello,
We scheduled 2 task

Task 1 generates a report using a macro in PDF which I can open and see its content without a problem.

Task 2 grabs the PDF file generated from the script and emails it. I receive the email but every time I try to open the attached file it says the following message.

"There was a error opening this document. The file is damaged and could not be repaired."

So far I have tried to save it and opening it but still receive the same message.

Does anyone know why the file is being corrupted when it sent via our local exchange server?
0
Comment
Question by:Spirit_US
  • 8
  • 5
13 Comments
 
LVL 14

Expert Comment

by:JAN PAKULA
ID: 39236227
how big is the file? - do you have a wait time between tasks? (looks like second task is grabbing not competed yet file)
0
 

Author Comment

by:Spirit_US
ID: 39236234
That is actually what I thought so I split this into 2 task with 20 minutes apart. The PDF file it generates is only 45kb. Thanks Jan!
0
 

Author Comment

by:Spirit_US
ID: 39236682
Hello,

I believe the problem is my actual MS Exchange Server 2010.

1. I've tried running the scheduled task from another computer and I get the same result
2. I've tried setting up the task to attach and email another PDF file that I've also confirmed that works but after email message same error.
3. I've tried reboot the mail server

So now I need to find out what changes perhaps I need to do on the exchange server side so when my receiver receives messages sent from the scheduled task it knows what to do so it doesnt corrupt the PDF file.

Any Ideas?
0
 
LVL 14

Expert Comment

by:JAN PAKULA
ID: 39236986
do you have to use sxtension pdf?

maybe your exchange block pdf files

in first task change extesnion to .pd (you can add it later)
0
 

Author Comment

by:Spirit_US
ID: 39237724
We have another server running a scripted task (not using the task scheduler) and it sends out many PDF via the same server without any corruption on the other end. Everyone receives the .PDF files and are able to read it so the server can't be blocking and having the extension should not be a problem.

I tried and changed the extension so it can send out as .pd but no success.
0
 
LVL 14

Expert Comment

by:JAN PAKULA
ID: 39237815
so the cause of error might be having nothing to do with the actual file being damaged
(seems more likly host machines adobe installation)

try that

http://helpx.adobe.com/acrobat/kb/pdf-error-1015-11001-update.html

(restart after)

also reinstalling adobe pdf might help
0
Do email signature updates give you a headache?

Do you feel like all of your time is spent managing email signatures? Too busy to visit every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

 

Author Comment

by:Spirit_US
ID: 39237947
I made those changes to my machine and had the scheduled task run again. I received the email but I still cannot open it. I think it might be the actual task scheduler, perhaps it incorrectly attaches the file before sending it out. I may need to do a PowerShell script the will attach and send out that PDF.
0
 
LVL 14

Expert Comment

by:JAN PAKULA
ID: 39237977
have you made thoose changes on the server?
0
 

Author Comment

by:Spirit_US
ID: 39238009
No. Remember I have Server1 that has the scheduled task and I have Server2 where the data resides.

Server1 runs the VBScript creating the PDF document on Server2 after it is created Server1 runs a scheduled task to attach and email the PDF document.

After Server1 creates the document I've opened it from another computer that has Adobe installed so the actual PDF after creation is perfectly fine it is when the other task runs and emails it out the the receiver cannot open it.
0
 

Author Comment

by:Spirit_US
ID: 39238023
I do not have Adobe installed on Server1 but I do have it install where the data resides on Server2
0
 
LVL 14

Expert Comment

by:JAN PAKULA
ID: 39239501
0
 

Accepted Solution

by:
Spirit_US earned 0 total points
ID: 39239519
Hello Jan,

We installed a new task scheduler software on Server1 and that resolved the issue. This whole time it was our task scheduling messaging system that has corrupted the PDF every time it would send out.

Anyway Thank you for the help!
0
 

Author Closing Comment

by:Spirit_US
ID: 39251076
I've isolated the issue to the task scheduler and downloaded a new one that resolved the issue.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
In this video we show how to create a mailbox database in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Servers >> Data…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now