First, make sure you're using the right tool for the job.
You haven't shared with us what conclusion you came to that convinced you that you should be using iTextSharp. Are you using a machete, when a pair of scissors would do the trick? This is a common pattern I've seen with junior developers.
What does that mean? That means:
- The non-technical boss says, "generate a PDF"
- The developer runs to Google, and searches "C# and PDF"
- The developer fixates on whatever comes up as the first search result as the only tool to be interested in.
Making Abstractions for Tool Selection
One thing that you'll have to learn as a developer is to not always take requirements literally, and to consider the tool to use for the job. What does this mean?
If your boss said there was a meeting for work at a restaurant five miles from the office, would you pick your feet as the tool to make that happen? Or how about at a restaurant four hundred miles away? In all these cases, a reasonable person would abstract that a different mode of transportation would be required.
As a developer, you're going to have to become very savvy at tool selection, or you'll frustrate yourself and waste a lot of time.
For most business cases, I'd bet that over 90% of the time, a desire for PDF generation can be accomplished with a report-writing tool such as SSRS (does not require SQL Server) or Crystal Reports. Both of these can generate a PDF, and you'd never need to learn a thing about the inner workings of the Portable Document Format specification -- which are arduous. Both have a GUI, which simplifies things; because in iTextSharp, you have to code everything that shows up on a page.
But your boss can't tell you that, as a non-technical manager. You have to figure this kind of stuff out. For tool selection, you have to think in terms of reliability, maintainability, and scalability. The role is more than just delivering a bunch of thrown-together code, if you're going to be successful in the long run.
Tutorials and Support
You must go through a few short tutorials before you select the right tool. How easy can you take a tutorial and model it to your needs? Does the tool have a support forum? If it's open source, how well is it maintained? (Don't pick a tool that's not recently maintained!) These are key points, because once you've thrown it into production, it can be hellish to get out of your project again if you discover limitations later.
You Must Justify Any Training or Consulting
You can't run to your boss every time you get stuck. Like others have written here, you'll be out the door quick. If you've properly used resources like StackOverflow, tutorials, and forums, THEN you go to your boss if you're still stuck. Never before.
PrintDialog.PrintVisual
with the PDF printer as a hard-coded print server printer selection. Its crude, but it worked for me.