This article will review the basics of programmatically inserting and positioning an image in a PDF being generated using the iTextSharp library. I’ll show you the code for doing so in both C# and VB.NET.
Here are the main categories I’ll be covering, with links to the appropriate section:
- Adding your image programmatically while generating your PDF
- Adjusting your image scaling so it renders nicely in your PDF
- Positioning your image in your PDF
- Example code in C#
- Example code in VB.NET
It’s a common requirement when developing Web applications to need to programmatically find out the name of the running Web page.
In this article I will look into some of the basic commands in ASP.NET that you can use to find the name of the Web page that is currently running the script. As part of this process I will also cover some of the typical component parts of a URL that you may have to deal with.
For clarity I’ll review the same commands in both C# and VB.NET.
In both VB.NET and C# you can find the current page name using: