Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7836549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:12:17+00:00 2026-06-02T14:12:17+00:00

I am sending a pdf file in email attachment, attachment is going successfully in

  • 0

I am sending a pdf file in email attachment, attachment is going successfully in email and it is showing me in email as attachment, but when i download this pdf it having no content i.e. it’s size is zero byte.
Am I missing some permission? or Any solution regarding this?

Here is my code

private void emailSend(String emailString, String subject, String pdfPath){

        String[] email = { emailString };
        Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);

        emailIntent.putExtra(Intent.EXTRA_EMAIL, email);
        emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, subject);
        emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,"MY body");
        emailIntent.setType("application/pdf");
        emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(pdfPath));

        startActivity(Intent.createChooser(emailIntent, "Send mail..."));
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T14:12:20+00:00Added an answer on June 2, 2026 at 2:12 pm

    Finally i got the solution to my problem from this post.

    I use

    emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File(pdfPath)));
    

    instead of

    emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(pdfPath));
    

    it resolved my issue.

    Thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried sending an e-mail with a pdf attachment over google app engine and
I'm sending an email using the cfmail tag, and trying to attach a PDF
I have a pdf file attachment saved in the cloud. The file is attached
I am confuse when m sending .mp3,.pdf,.mpeg or .exe file in MFMailComposeViewController because i
I'm trying to upload a PDF file to a website using Hot Banana's content
I am sending an email using PHP mail function, but I would like to
I'm sending links to php pages that then generate and/or display a pdf file.
This codes sending one specific file, how can I send a list of files
Hi I have a problem in sending data from php to pdf. I think
sending mail along with embedded image using asp.net I have already used following but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.