Friday, December 09, 2005

Resize And Markup A PDF For Free (Well If You Have The .Net Dev Environment Anyway)

Well, yesterday I promised you code to resize or markup pdf documents. I've been frustrated for years because every library I ever used made the pdf look horrible when I did a resize. Then ITextSharp entered my life and everything changed. After a bit of work I was able to come up with the code that allows me to resize a pdf to A,B,C,D,E,A3 or A4. I can also markup the pdf. This code will create a command line program for you that will do the same.

To get this working:

  1. Create a new Console Application VB .NET project
  2. Set a reference to the ITextSharp dll (found from the ITextSharp link above)
  3. Set the startup object as the Main subroutine in the code
  4. Build the project
After building the project you will get a command line program. The arguments to this program will be:

  1. Source PDF file
  2. Destination PDF File
  3. Operation - Resize or Markup
  4. The size for the destination PDF (A,B,C,D,E,A3 or A4) or the markup text
Since the commercial alternatives to this free software cost "real" money, I would not mind a small donation (if you feel really generous). To do this use the following link (defaults to $10):



The code can be downloaded at:

http://www.streamload.com/lamberms/PDFCommandLineCode.zip

Happy Coding!

1 comment:

Matt said...

This sounds really good, but the download link is not working, please fix or e-mail, thank-you.