CDO and PDF Files

Discussion in 'ASP General' started by Jeff, Feb 15, 2005.

  1. Jeff

    Jeff Guest

    We're having some trouble with some PDF files sent to our customers,
    they aren't able to be read because they are "damaged, and cannot be
    repaired". Looking into this, I think it has to do with the encoding
    we are using. We don't specify a type and I think it's defaulting to a
    7-bit encoding, when I think we need 8.

    First of all, does that sound right? If so, does anyone have an
    example of how to specify the right encoding for PDF files? The
    messages are in HTML format, with PDF files attached. We're using VB6
    and CDO.

    Thanks in advance....

    Here is a snippit of the code we use.

    With oMail

    ..Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
    = pSendUsingPickup

    ..Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
    = mRunOptions.SMTPServer

    ..Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
    = mRunOptions.SMTPServerPort

    ..Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")
    = mRunOptions.PickUpPath

    ..Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
    = mRunOptions.SMTPConnectTimeout
    .Configuration.Fields.Update

    .Subject = "eMail Report
    .From = ""
    .To = pLastAddr
    .AddAttachment (App.Path & "\our_logo.gif")
    .AddAttachment "Test.PDF"
    .HTMLBody = pHTMLHeader & pHTMLBody & pHTMLFooter
    .Send
    End With
     
    Jeff, Feb 15, 2005
    #1
    1. Advertising

  2. Jeff

    Jeff Cochran Guest

    On 15 Feb 2005 07:46:33 -0800, "Jeff" <>
    wrote:

    >We're having some trouble with some PDF files sent to our customers,
    >they aren't able to be read because they are "damaged, and cannot be
    >repaired". Looking into this, I think it has to do with the encoding
    >we are using. We don't specify a type and I think it's defaulting to a
    >7-bit encoding, when I think we need 8.
    >
    >First of all, does that sound right? If so, does anyone have an
    >example of how to specify the right encoding for PDF files? The
    >messages are in HTML format, with PDF files attached. We're using VB6
    >and CDO.


    We have no issues sending PDF attachments using CDO. Though we don't
    use HTML format, I doubt that's the issue. As for the code, ours is
    virtually identical with the exception of not using a pickup and not
    setting any connection timeout, plus the non-HTML.

    Are you possibly sending Acrobat 6/7 formats? We default to Acrobat
    3.0 and above for most, 5.0 and above for the rest.

    Jeff


    >Thanks in advance....
    >
    >Here is a snippit of the code we use.
    >
    > With oMail
    >
    >.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing")
    >= pSendUsingPickup
    >
    >.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver")
    >= mRunOptions.SMTPServer
    >
    >.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport")
    >= mRunOptions.SMTPServerPort
    >
    >.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverpickupdirectory")
    >= mRunOptions.PickUpPath
    >
    >.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout")
    >= mRunOptions.SMTPConnectTimeout
    > .Configuration.Fields.Update
    >
    > .Subject = "eMail Report
    > .From = ""
    > .To = pLastAddr
    > .AddAttachment (App.Path & "\our_logo.gif")
    > .AddAttachment "Test.PDF"
    > .HTMLBody = pHTMLHeader & pHTMLBody & pHTMLFooter
    > .Send
    > End With
     
    Jeff Cochran, Feb 16, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Guest
    Replies:
    2
    Views:
    959
    dave wanta
    Jul 11, 2003
  2. vasudevram
    Replies:
    0
    Views:
    581
    vasudevram
    Jul 22, 2006
  3. Replies:
    0
    Views:
    319
  4. Ricardo Pog
    Replies:
    1
    Views:
    491
    Austin Ziegler
    Mar 26, 2008
  5. Sean Nakasone
    Replies:
    1
    Views:
    431
    Farrel Lifson
    Apr 14, 2008
Loading...

Share This Page