.Net, ASP.NET, C#, CodeProject, iTextSharp, PDF, Programming, Software, VB.NET, Web Development, WebForms

iTextSharp – Insert an Image to a PDF in C#

iTextSharp PDF
Using iTextSharp to Generate a PDF

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:

  1. Adding your image programmatically while generating your PDF
  2. Adjusting your image scaling so it renders nicely in your PDF
  3. Positioning your image in your PDF
  4. Example code in C#
  5. Example code in VB.NET

If you are interested in working with the iTextSharp .NET libraries then have a look at some of the other articles covering iTextSharp I have written on the topic. Continue reading “iTextSharp – Insert an Image to a PDF in C#”

CodeProject, Technology

Introducing the Samsung Series 9 Ultrabook

Samsung Series 9 Ultrabook
The Super-Slim Samsung Series 9 Ultrabook

I don’t often write about hardware, but the Samsung Series 9 ultrabook has caught my attention. It’s a nice step up from the existing Samsung Series 5 line of ultrabooks, particularly in the display resolution and CPU horsepower. As well, it stands out from the crowd of ultrabooks currently on the market as a sleek high-end device.

But Back to Basics: What Exactly is an Ultrabook?

Ultrabook laptops are taking off from where the netbooks of yesteryear left off. 2012 is promising to become the year of the ultrabook since the technology behind them has matured to the point where they are a viable alternative to traditional laptops.

What defines an ultrabook? They are light-weight (typically below 4 pounds). This weight is achieved primarily by removing the optical drive (ie: the DVD drive) as well as replacing the traditional hard-disk drive (HDD) with a solid state hard drive (SSD).

These days the loss of an optical drive is not a big deal when one considers their considerable weight. Almost all software and even movies can be bought online these days so the need to have an integrated DVD drive is non-existant.

At this point in time we have what I see as two generations of ultrabooks. The first came out in 2011 and typically sport 1366×768 monitor resolutions along with 128 GB SSD storage. The second generation coming out in Q2 of 2012 has upgraded SSD storage along with resolutions running at 1600×900.

Continue reading “Introducing the Samsung Series 9 Ultrabook”

CodeProject, Database, Programming, SQL, SQL Server 2000, SQL Server 2005, SQL Server 2008, SQL Tips, Transact-SQL, tSQL

SQL Server: Search Stored Procedure Create/Modify Date or Text using tSQL

SQL Server Management Studio (SSMS) is a great tool for managing instances of your SQL Server databases. Sometimes, though, the fastest way to retrieve information you are looking for isn’t through the SSMS GUI, but through direct SQL queries.

Case in point: if you want to search for specific information about stored procedures in your database. Rather than look one by one through the code, you can query the SQL Server sys.objects and sys.procedures tables to find exactly what you are looking for.

To search for stored procedures that were created or modified on a specific date, you can directly search either the sys.objects and sys.procedures tables.

Note: I have written and tested the example queries below in SQL Server 2005 and SQL Server 2008. The syntax for earlier or later platforms may vary. For example SQL Server 2000 does not support the sys.objects and sys.procedures tables.

Continue reading “SQL Server: Search Stored Procedure Create/Modify Date or Text using tSQL”