title: Eclipse - Print report from app with Google Cloud Print
body: <p>I am developing an android application in eclipse to print a report via Google Cloud Print.
  This <a href="https://developers.google.com/cloud-print/docs/android" rel="nofollow">tutorial</a> from Google has me on the right track. <br>
  I have already installed <a href="http://itextpdf.com/download.php" rel="nofollow">itext</a> to generate the Report.pdf</p>
  
  <p>My problem is in the "print" element of my applications UI. Google supplies this code:</p>
  
  <pre><code>Intent printIntent = new Intent(this, PrintDialogActivity.class);
  printIntent.setDataAndType(docUri, docMimeType);
  printIntent.putExtra("title", docTitle);
  startActivity(printIntent);
  </code></pre>
  
  <p>With the message: </p>
  
  <blockquote>
    <p>"In the code above, replace the three parameters as follows: docUri -
    URI of the document to be printed docMimeType - MIME type of the
    document to be printed. We recommend that you use PDF
    (application/pdf) format docTitle - title of the printed document,
    arbitrary string that will be shown on the GCP management console as
    the print job's title</p>
  </blockquote>
  
  <p>My PDF is saved at <code>/data/Student/StudentReportPDF.pdf</code> </p>
  
  <p>I have tried changing the docUri, docMimeType and docTitle has follows: With no luck</p>
  
  <pre><code>Intent printIntent = new Intent(this, PrintDialogActivity.class);
  printIntent.setDataAndType(StudentReportPDF, .pdf);
  printIntent.putExtra("title", Student Report);
  startActivity(printIntent);
  </code></pre>
  
  <p>All 3 elements result in red squigglies.</p>
  
  <p>Can someone spot my mistake or I guess clarify these 3 elements for me?</p>
  
  <p>printing eclipse-plugin pdf-generation itext google-cloud-print</p>