-1

I would like to add a PDF in Body of mail, not with AddInlineStringAttachment() but in body. The goal is to see the pdf without download. Thank's

jh314
  • 27,144
  • 16
  • 62
  • 82
Max Trs
  • 1
  • 1
  • For that you will have to embed a PDF viewer in your e-mail, which doesn't seem to be possible. So your best bet would be converting the PDF into an image or HTML. – Keval Jun 22 '15 at 06:49

1 Answers1

0

So, what you can do is embed the PDF to your the html part of the e-mail, you can do that in several ways.

1 - Using <object> tag:

<object width="400" height="400" type="application/pdf" data="http://emersonjair.info/files/rf-pibic-2013-Emerson.pdf"></object>

2 - Using <iframe> tag:

<iframe src="http://emersonjair.info/files/rf-pibic-2013-Emerson.pdf"></iframe>

3 - Using <embed> tag:

<embed type="application/pdf" src="http://emersonjair.info/files/rf-pibic-2013-Emerson.pdf">

4 - Using PDF.js:

PDF.js Github page

5 - Using pdf2htmlEX

pdf2htmlEX Github page

6 - Here is a similar question:

Recommended way to embed PDF in HTML?

PS: The user is gonna download the PDF file anyway, even if he doesn't save it for later.

Community
  • 1
  • 1
Emerson Jair
  • 128
  • 7