wood burning stoves 2.0*
The moose likes Other JSE/JEE APIs and the fly likes is it possible to embbed a pdf file in message body of email?with apache commons or in any way? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "is it possible to embbed a pdf file in message body of email?with apache commons or in any way?" Watch "is it possible to embbed a pdf file in message body of email?with apache commons or in any way?" New topic
Author

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

Rosu Thomas
Greenhorn

Joined: Jun 19, 2012
Posts: 17
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
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
Binary data can't be sent in the body of an email. That's what attachments are for. What are you trying to achieve?


Ping & DNS - updated with new look and Ping home screen widget
Rosu Thomas
Greenhorn

Joined: Jun 19, 2012
Posts: 17
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
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
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
Bartender

Joined: Jan 17, 2008
Posts: 2066
    
  22

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

Joined: Oct 27, 2005
Posts: 19556
    
  16

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
alice robert
Greenhorn

Joined: Feb 20, 2013
Posts: 1
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.


<{[( alice )]}>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: is it possible to embbed a pdf file in message body of email?with apache commons or in any way?
 
Similar Threads
Cannot get the complete filename
sending email
Loadjava program
Opening a File with the appropriate program with highlighted text
How to search image content present in PDF file