• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..........
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic