Wednesday, July 29, 2009

Convert html to pdf: wkhtmltopdf

If you want to convert html to a pdf, there's no easier way to do it other than wkhtmltopdf!
I found some other interesting tid bits too:
Make sure you use the 0.8.3 or greater version, otherwise you may get an error:
"wkhtmltopdf: cannot connect to X server"
If you are using this from a web server, you need to use the proper headers for a PDf file. Even though that example is in PHP, the same applies to Perl as well (using some form of CGI (I use CGI::Fast))

print header(
-Content_type => 'application/pdf',
-Content_disposition => 'attachment; filename=report.pdf',
);

Note: Put in whatever name you like in place of "report.pdf"

Perhaps in the near future I'll have a nice examples site with all the code!

Wednesday, July 8, 2009

The New^3

Is there a better way to start off a NEW blog with a story about moving to a NEW house in a NEW town? Answer: I don't think so!

Btw, if you click the story title, it automatically goes to a map of Bellwood, PA for your viewing convenience :) Also the title "New^3" means New to the 3rd power - there's really that much newness!

New blog
This is my first real public blog. I like google so I went with the google blog service - that's easy! I like the auto save and that you can easily add gadgets. I haven't poked around with that yet.

New house
The entire house is completely redone with a very nice hardwood floor! I have some pics but haven't uploaded em yet. It has 4 bedrooms and the biggest one is to be used for the home office. It's gonna take a while to set it all up! The attic is huge and the plan is to build an indoor rock wall up there.

New town
The town is Bellwood, PA, it's an itty bitty town. There's good road biking, good kayaking and good skiing/mt biking at Blue Knob Mt which is less than an hr south west of here.

Packing
It didn't take me very long to pack (only about 3 days). It went quick because I spent about a week, the month before packing up my books and going through everything in my room for a pre-trip that I did to PA. It took a number of days straightening up the garage back in NY to have a staging area for all the boxes and crates! The rest of the packing was stuff for the rest of the house which my brother primarily did.

Packing Lessons Learned
  1. Need a very good supply of boxes
  2. It's good to pack stuff in many varied sizes boxes if lugging furniture
  3. Need a very clear staging area
  4. Having a good dolly / hand truck is awesome
The Truck
On July 4th, we got a 16 foot truck (surprisingly the truck place was open) and packed it to the brim! It took a solid 10 hours to pack the truck. We then packed up 3 cars with the rest of the stuff, that took 4 hours. We even used the truck's passenger side seat to fit more stuff...

Truck Lessons Learned
  1. Get a bigger truck than what you think - especially if you have big furniture
  2. Don't forget to eat lunch while packing the truck - I forgot!
  3. Allow for plenty of time for packing the truck
  4. Don't smash up your fingers or pull muscles - you'll need em later
  5. Put those small various sized boxes in between the bulky things
Driving
We started driving noon on July 5th. Myself, my brother and parents all joined in the driving caravan and every vehicle was packed. We brought walkie-talkies and they worked out great. The drive usually takes 5.5 to 6 hrs but it took 10 hours between stopping and getting separated, going through LOTS of delays cause of construction and taking detours around the delays.

Driving Lessons Learned
  1. Walkie-talkies are kick-butt things to have - don't use up your minutes!
  2. Having an in car GPS is awesome
  3. Having an in car map would have been good to avoid the delays
Unpacking The Truck
We had help from 2 friends to unload the truck. The unloading took about 2 hours, it went really fast.

House Setup
The house setup started on July 6th. This part is the most exhausting part. With the initial packing, most of the stuff is either staying at the same house level or going down stairs. With truck unloading, you are just lugging the stuff a short distance using a hand truck into the house. With the house setup, you gotta lug a ton of stuff up the stairs!! My brother had to go off to work and so I was lugging stuff alllllll daaaaaaay loooooong. My parents helped out a little too. I went up and down the stairs a million times! My brother conveniently took pics of the disaster at the start of the lugging.

My 1 Day Rule
Since college days, I got really good at setting up my room, I did it 5 times, once per year attending. I always like to setup my room in 1 day and on the first day of setup and I did it! After lugging stuff all day on Monday, I setup my entire room all nicey-nice. I decided I need more furniture though, cause my closet is very small.

House Setup Day 2
Tuesday July 7th, day 2 which was yesterday, was getting the little things done like putting the little pads on the bottom of the furniture and situating things better. I mostly napped yesterday!