Solved

Server 2008 R2 corrupting PDF when scheduled task emails

Posted on 2013-06-10
13
649 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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
 

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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

770 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