I’m sorry I haven’t written in a few weeks. My wife and I were just blessed with a newborn and all though an awesome experience and unlike anything else, it is very tiring and trying to say the least. .
In the project I am currently working on, there is a requirement to have a printing option. Usually this would be a relatively easy task, but the requirement also stated that you had to control the amount of copies of that particular PDF document. The reason for this is that the PDF document was not allowed to be duplicated once printed. My first thought was to either use Silverlight or Active X controls. Silverlight apparently (in browser mode) does not have a way around the print dialog because it cannot directly access the operating system. For unknown reasons to me, the client is completely set against using Active X even though this is an internal application, so that was also out.
var res = app.setTimeOut('var pp = this.getPrintParams();pp.interactive = pp.constants.interactionLevel.automatic;this.print(pp);', 200);
Here is an example of it’s usage:
I am always a fan of using the ‘using’ keyword to make sure that my open connections and streams are closed when out of scope, but there is a Close() method as well.
Next time, I hope to make a new tutorial on using ITextSharp.
Happy Coding !!