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

  • Home
  • SEARCH
  • 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 8382951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:02:53+00:00 2026-06-09T17:02:53+00:00

Can we create PDF file in android? I have Tried all Google Search. Also

  • 0

Can we create PDF file in android?

  • I have Tried all Google Search.
  • Also seen more examples on it.
  • And i have tried this,

    File f=new File("/data/data/com.pdf/test1.pdf");  
    Log.d("test", "created");  
    Document document = new Document();  
    PdfWriter.getInstance(document, new FileOutputStream(f));  
    document.open();            
    document.addTitle("My first PDF");
    document.addSubject("Using iText");
    document.addKeywords("Java, PDF, iText");  
    document.addAuthor("Lars Vogel");
    document.addCreator("Lars Vogel");
    Paragraph paragraph = new Paragraph("This is left aligned text with indentation");
    paragraph.setAlignment(Element.ALIGN_LEFT);
    paragraph.setIndentationLeft(50);
    document.add(paragraph);
    document.close();
    Toast.makeText(this, "Pdf Created", Toast.LENGTH_LONG).show();  
    

But This Gives Error As ,

08-11 16:53:38.446: E/AndroidRuntime(2484): FATAL EXCEPTION: main
08-11 16:53:38.446: E/AndroidRuntime(2484): java.lang.NoClassDefFoundError:          com.itextpdf.text.Document
08-11 16:53:38.446: E/AndroidRuntime(2484):     at com.pdf.PDFReaderActivity.onCreate(PDFReaderActivity.java:28)
08-11 16:53:38.446: E/AndroidRuntime(2484):     at android.app.Activity.performCreate(Activity.java:4465)
08-11 16:53:38.446: E/AndroidRuntime(2484):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
08-11 16:53:38.446: E/AndroidRuntime(2484):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
08-11 16:53:38.446: E/AndroidRuntime(2484):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
08-11 16:53:38.446: E/AndroidRuntime(2484):     at android.app.ActivityThread.access$600(ActivityThread.java:123)
08-11 16:53:38.446: E/AndroidRuntime(2484):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
08-11 16:53:38.446: E/AndroidRuntime(2484):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-11 16:53:38.446: E/AndroidRuntime(2484):     at android.os.Looper.loop(Looper.java:137)
08-11 16:53:38.446: E/AndroidRuntime(2484):     at android.app.ActivityThread.main(ActivityThread.java:4424)
08-11 16:53:38.446: E/AndroidRuntime(2484):     at java.lang.reflect.Method.invokeNative(Native Method)
08-11 16:53:38.446: E/AndroidRuntime(2484):     at java.lang.reflect.Method.invoke(Method.java:511)
08-11 16:53:38.446: E/AndroidRuntime(2484):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
08-11 16:53:38.446: E/AndroidRuntime(2484):     at com .android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
08-11 16:53:38.446: E/AndroidRuntime(2484):     at dalvik.system.NativeStart.main(Native Method)  
  • 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-09T17:02:54+00:00Added an answer on June 9, 2026 at 5:02 pm

    I guess that the jar which contains the PdfWriter class got not exported into the apk file.

    Look here for a solution.

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

Sidebar

Related Questions

Can we create PDF file from android application, do any libraries available to do
I am trying to create a PDF file of current view. Can anyone please
There's this program, pdftotext, that can convert a pdf file to a text file.
I can create PDF file with wkhtmltopdf in linux Ubuntu: wkhtmltopdf www.stackoverflow.com file.pdf How
Currently i can create PDF files from images in Imagick with this function $im->setImageFormat(pdf);
We have a process that has SQL Server Reporting Services create a pdf file
The above question says it all. I know you can create a PDF from
I use this code for create a 80x30 mm pdf file with a 25x25
I am trying to create PDF file using DOM pdf and Codeigniter. I have
How can i create PDF thumbnails in TeXShop using LaTeX and thumbpdf? I have

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.