title: Android PDF Writer (APW) not displaying PDF
body: <p>I'm trying to use <a href="http://sourceforge.net/projects/apwlibrary/" rel="nofollow noreferrer">APW library</a> into my app but I cannot make it work. Also, I can't find any demo, how-to or full code example to guide me using this library. Here is what I've done so far:</p>
  
  <p><strong>XML</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"&gt;
  
  &lt;TextView
          android:id="@+id/text"
          android:layout_height="fill_parent"
          android:layout_width="fill_parent"&gt;
  &lt;/TextView&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>PDFWriterDemo.java</strong></p>
  
  <pre><code>public class PDFWriterDemo extends Activity {
  
      TextView mText;
  
      private String generateHelloWorldPDF() {
          PDFWriter mPDFWriter = new PDFWriter(PaperSize.FOLIO_WIDTH, PaperSize.FOLIO_HEIGHT);
          mPDFWriter.newPage();
          mPDFWriter.setFont(StandardFonts.SUBTYPE, StandardFonts.COURIER_BOLD);
          mPDFWriter.addText(150, 150, 14, "http://stackoverflow.com");
          mPDFWriter.addLine(150, 140, 270, 140);
  
          int pageCount = mPDFWriter.getPageCount();
          for (int i = 0; i &lt; pageCount; i++) {
              mPDFWriter.setCurrentPage(i);
              mPDFWriter.addText(10, 10, 8, Integer.toString(i + 1) + " / " + Integer.toString(pageCount));
          }
  
          String s = mPDFWriter.asString();
          return s;
      }
  
      private void outputToScreen(int viewID, String pdfContent) {
          mText = (TextView) this.findViewById(viewID);
          mText.setText(pdfContent);
      }
  
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_pdf);
          String pdfcontent = generateHelloWorldPDF();
          outputToScreen(R.id.text, pdfcontent);
      }
  }
  </code></pre>
  
  <p>I'm calling <code>PDFWriterDemo</code> from my <code>MainActivity</code> like this:</p>
  
  <pre><code>Intent pdf= new Intent(MainActivity.this, PDFwriterDemo.class);
  pdf.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
  startActivity(pdf);
  </code></pre>
  
  <p>And this is the output:
  <img src="https://i.stack.imgur.com/yXYhg.png" alt="enter image description here"></p>