• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

is it possible to embbed a pdf file in message body of email?with apache commons or in any way?

 
Rosu Thomas
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
is it possible to embbed a pdf file in message body of email?(not as attachment)with apache commons or in any way? i don't want to convert my pdf image to any other format(. jpeg/any)

please help me........
thanks in advance..........
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Binary data can't be sent in the body of an email. That's what attachments are for. What are you trying to achieve?
 
Rosu Thomas
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
whenever user take a deal from my site, i want to send him a mail with pdf file (coupon) in embedded form .......so that he can take print of the mail instead of downloading my attachment.....................this is my requirement......sorry for my bad English............
thanks in advance
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no way to "embed" a document in an email besides making it an attachment. I don't understand what that has to do with what the user does with the document, though. Why wouldn't a user be able to print a document that's sent as an attachment?
 
Jayesh A Lalwani
Rancher
Pie
Posts: 2756
32
Eclipse IDE Spring Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to send graphical content embedded in an email, you might have to use HTML email. Basically, its email composed as an HTML page. Most email clients support it now, but the support isn't standard, and some people are vehemently opposed to it. Most email clients will block non textual content in an email from a untrusted sender. The recipient will have to tell the email client that they want to see non textual content. So, your email will most certainly look funky the first time they receive it.
 
Rob Spoor
Sheriff
Pie
Posts: 20393
47
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless you use embedded resources. Apache Commons Email's HtmlEmail has several embed methods for that. However, that only works for a limited set of resources. As far as I know it only works for images.

Is it even possible to embed PDF files in HTML at all?

I wouldn't even bother and just include the PDF file as a regular attachment.
 
alice robert
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With the PDF format, your small business can create documents viewable in virtually any operating system or computing platform. Using Adobe Acrobat or other PDF authoring programs, you can create portable documents from any application that supports printing, thus making it an ideal medium for sending letters, contracts, images or just about any other document electronically. In many cases, when you want to send someone a PDF document, you can attach the file to an email just as you would any other type of file. However, if you want the recipient to be able to view the PDF document in the body of the email message as soon as it is opened, many email clients require that the PDF file be embedded as an image. As long as the receiver’s webmail or desktop email client supports images -- and most do -- the reader will see the PDF file when the message is opened.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic