title: How to print pdf portfolio in <object> tag using javascript or jQuery or ajax
body: <p>Below is my code in xhtml to embed the PDF portfolio:</p>
  
  <pre><code>    &lt;h:panelGroup layout="block"&gt;
                      &lt;object id="pdfViewer" type="application/pdf"
                          data="#{sessionScope.showPortfolioURL}" height="700px"
                          width="100%"&gt; &lt;/object&gt;
                  &lt;/h:panelGroup&gt;
  </code></pre>
  
  <p>Could anybody please let me know how to print the PDF portfolio using javascript or jQuery or ajax on button click?
  I have the Print option over my embedded PDF but I am not able to use it since I have requirement to mark the entry in database once someone tried to print it. So I will have to make a back-end call from the same JS function. If you know anyway through primefaces then it would be great but I think there is none.</p>
  
  <p>If there is any way I can call embedded Adobe Portfolio's default Print functionality from my application through Javascript or something then that would also do for me.</p>