How can I embed a PDF in an email?

后端 未结 4 2020
有刺的猬
有刺的猬 2020-12-20 03:12

I\'ve already referred to this SO post. I\'ve been embedding images using an AlternateView for PNG files. Now I\'m wondering how to do it with PDFs.

Should it work

相关标签:
4条回答
  • 2020-12-20 03:22

    This is not possible--at least not in a way that will work with many clients. You'll need to just attach the file.

    If you have only one client to worry about, it might be possible--but not likely without manually changing settings on each client.

    0 讨论(0)
  • 2020-12-20 03:23

    The MIME type of a PDF is "application/pdf" not "image/pdf"

    0 讨论(0)
  • 2020-12-20 03:25

    You can embed images since they can be rendered in place by an email client. PDFs cannot do that, so I'd recommend either having a thumbnail of the PDF that links to your web site with the actual PDF. Or just attach the PDF to the email message.

    0 讨论(0)
  • 2020-12-20 03:29

    There are a few options that I know of.

    1) Is the simplest way okay? The easiest by far would be to attach the PDF as a normal attachment. Then render the first page of the pdf as an image, embed it in the email and link it to open the PDF if you can. Entourage kind of does this on the Mac.

    Alternatively, what I found was the following:

    2) FLASHPAPER embedded in HTML displaying a PDF. Adobe has a technology called Flashpaper. It is a flash based file viewer. You can use flashpaper format documents that go into it, or PDFs as the source.

    Check out some examples. That's really flash. http://www.adobe.com/products/flashpaper/examples/

    Assuming you send an HTML email that will get through (images aren't turned off, etc), you can can embed the Flashpaper viewer right in your HTML code as a normal Flash object.

    Most HTML email clients use Internet Explorer Bits, Webkit bits, or Gecko bits to render the html. Flash player is pretty well installed on everything, so it works well. A good example of this is when we open an email and it has video playing in it. It's almost always Flash.

    I have had luck doing it this way -- the only thing you'd have to decide is if most of your clients can see this and how much (if any) today's software might block it.

    What I ended up doing was a hybrid. 1) Attach it to the email, 2) Embed the Flashpaper viewer. They get it either way.

    Flashpaper is available seperately for $75. It has come in handy where the client was not able to install adobe acrobat on each computer and it had to be 100% web based.

    I would imagine you should be able to do the same using any language with a little more effort and using something like Flashpaper.

    Hope that helps

    0 讨论(0)
提交回复
热议问题