We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error with pdf files

An email with a pdf attachment -When it arrives at it sent destination the pdf can be read.

When the email is forwarded with Aspose.dll

we get below error:
An error exists on this page. Acrobat may not display this page correctly. etc.

see attachment.

Any ideas?

Happens only occasionally.

Hi Joel,

Thank you for writing to Aspose Support team.

We have tested this issue by attaching your sample PDF file and sending it using the API’s SmtpClient and no such issue was observed at the receiving end. The attachment can be downloaded and viewed without any issue.

Can you please share the email sample with PDF attachment with us that is received at the receiving end? We will try sending that from our end and share our feedback with you. Please also share your sample code with us for our reference.

I emailed you the pdf - I can not send it as an attachment

I sent it to Aspose.com -
Automated Emal

<span style=“font-size:14.0pt;font-family:“Calibri”,“sans-serif”;
color:#1F497D”>It’s becoming a major issue in the company.<o:p></o:p>

They must scan the pdfs and are encountering errors.

Below is the code:

To Summarize:

I’m sending the same way I receive it.

I’m just clearing the to, cc and bcc properties and replacing with other info also changing the Subject.

using Aspose.Email.Mail;

using Aspose.Email.Outlook;

using Aspose.Email.Pop3;

using Aspose.Email;

using Aspose.Email.Mime;

using Aspose.Email.Imap;

private static void SendEmail(MailMessage xoEmail, string xsSubject, string xsFrom, bool xbForward, bool xbTracking)

{

try

{

SmtpClient moClient = new SmtpClient(ConfigurationManager.AppSettings["EmailHost"], 25, ConfigurationManager.AppSettings["EmailUsername"], ConfigurationManager.AppSettings["EmailPswd"]);

moClient.SecurityOptions = SecurityOptions.Auto;

xoEmail.CC.Clear();

xoEmail.Bcc.Clear();

xoEmail.To.Clear();

string psPrefixSubject = ConfigurationManager.AppSettings["Prefix Subject"];

string psSendTo = ConfigurationManager.AppSettings["Forward Emails To"];

string psLateNotice = ConfigurationManager.AppSettings["Forward Emails With Late Notice To"];

string psEmailTracking = ConfigurationManager.AppSettings["Forward Emails To Tracking Scan"];

string psSentToAp = "";

if (xbForward)

{

psSentToAp = "<<>> ";

}

if (xbTracking)

{

xoEmail.CC.Add(psEmailTracking);

}

if (xbForward)

{

xoEmail.CC.Add(psLateNotice);

}

xoEmail.To.Add(psSendTo);

xoEmail.Subject = psSentToAp + psPrefixSubject + xsSubject;

moClient.Send(xoEmail);

}

catch (Exception exc)

{

string psErrorFile = "EmailErrorLogSendError.txt";

DateTime now = DateTime.Now;

int plErrorCode = System.Runtime.InteropServices.Marshal.GetExceptionCode();

if (plErrorCode == -532459699)

{

psErrorFile = "EmailErrorLogSendError532459699.txt";

}

using (StreamWriter outfile = File.AppendText(@ConfigurationManager.AppSettings["EmailErrors"] + psErrorFile))

{

outfile.WriteLine(now + @" Email From: " + xsFrom + " Subject: " + xsSubject + " Reason: " + exc.Message.ToString());

outfile.Close();

}

try

{

EmailLogger.SendTheEmail(ConfigurationManager.AppSettings["EmailSenderAddr"], xsFrom, xoEmail.Subject, xoEmail.Body, xoEmail, null);

now = DateTime.Now;

using (StreamWriter outfile = File.AppendText(@ConfigurationManager.AppSettings["EmailErrors"] + "EmailSuccessLogOpmx.txt"))

{

outfile.WriteLine(now + @" Email From: " + xsFrom + " Subject: " + xsSubject + " Success!");

outfile.Close();

}

}

catch (Exception ex)

{

now = DateTime.Now;

using (StreamWriter outfile = File.AppendText(@ConfigurationManager.AppSettings["EmailErrors"] + "EmailErrorLogOpmx.txt"))

{

outfile.WriteLine(now + @" Email From: " + xsFrom + " Subject: " + xsSubject + " Reason: " + ex.Message.ToString());

outfile.Close();

}

}

Console.WriteLine(exc.Message);

}

}

It’s acrobat 4.0 Could that be a problem?

Also, we are using an Evaluation version Could that be a problem?

We are desperate!

Hi Joel,


I have not received any mail yet. You may please press “Contact” button above and press “Send Kashif an Email”. Here send me email with sample EML(having PDF attachment) as attachment.

Following are the steps, I performed to test the scenario here using your above sample PDF file as attachment.

1. Using Outlook, generated email with sample PDF as attachment
2. Sent this email using outlook
3. Received this email using AE
4. Modified the email using AE such that CC, Bcc, To cleared. Added new To
5. Sent this mail again using AE
6. On the receiving end, opened this email using outlook
7. The attachment PDF file is fine

Please review these steps, and if any difference is there, inform us so that issue can be re-produced here accordingly.

We are sorry for the inconvenience caused to you in this regard.