java - Struts 2 stream result. Run javascript on page -


i have dynamically created pdf using pdfbox library. then, use struts 2 stream result display pdf in browser this:

        <result name="preview" type="stream">              <param name="contenttype">application/pdf</param>              <param name="inputname">inputstream</param>              <param name="contentdisposition">filename="stream.pdf"</param>              <param name="buffersize">1024</param>         </result>  

what want now, have browser open print dialogue. tried embedding javascript in pdf adobe acrobat pro, , works long user has adobe pdf viewer plugin in browser. however, trying make work safari, , seems default in browser pdf viewer on rides embedded javascript in document.

is there way using javascript or struts can tell page print?

thanks!


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -