PDF Generation: Whats the Problem with iText?

Put your problem here if it does not fit any of the other categories.

PDF Generation: Whats the Problem with iText?

Postby method1545 » Tue Nov 10, 2009 8:26 pm

Hi,

i am trying to generate a PDF File in my Android App.

I have read many different things about iText and Android. Some people say it works, some say it doesnt.

Fact is trying something like:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. Document document = new Document();
  3.  
  4.                 try
  5.  
  6.                 {
  7.  
  8.                         PdfWriter.getInstance(document, new FileOutputStream("Test.pdf"));
  9.  
  10.                         document.open();
  11.  
  12.                         document.add(new Paragraph("Hello World"));
  13.  
  14.                         document.close();
  15.  
  16.                        
  17.  
  18.                         Log.i(Constants.DEBUGTAG, "done - " + new File("Test.pdf").exists());
  19.  
  20.                        
  21.  
  22.                 } catch (FileNotFoundException e)
  23.  
  24.                 {
  25.  
  26.                         e.printStackTrace();
  27.  
  28.                 } catch (DocumentException e)
  29.  
  30.                 {
  31.  
  32.                         e.printStackTrace();
  33.  
  34.                 }
  35.  
  36.  
Parsed in 0.032 seconds, using GeSHi 1.0.8.4


gives me an error from the runtime.

is there anybody who has a tutorial or a definitely 'NO' to itext on android? :roll:
method1545
Freshman
Freshman
 
Posts: 5
Joined: Mon Oct 19, 2009 1:24 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Exabot [Bot] and 26 guests