Friday, July 15, 2011 6:40:51 PM UTC :: Filed Under ASP.NET | C#

At work, I am responsible for an ASP.NET application that allows the user to print PDF files from the server that hosts the web site.  In order to print the PDF files, the web application invokes a process by calling the AcroRd32.exe and passing command line parameters.  For a while, this seemed to be a decent solution, other than the fact that calling Acrobat Reader via the command line is not supported by Adobe

Upon the latest update to the web application, we started having a lot of problems getting the PDF files to print.  After literally spending a week of my time trying to determine what the issue was, I still had no solid clue as to why the PDFs would sometimes print and sometimes wouldn't.  When they didn't print, there was no error in the log file.  I attached a remote debugger to the installed web application and the web application was correctly invoking the Acrobat Reader process and passing-in the appropriate file path and printer name.   What really got me confused is that I could see the AcroRd32.exe process start-up in the server's Task Manager, but no job would land in the print queue.

Then one lucky day, I discovered this article:

Microsoft Support:  How to send raw data to a printer by using Visual C# .NET

I created the test application in the article, sent a test print to a local printer, and sure enough... it works!  And no Adobe Acrobat Reader required!   I ripped-out all reference to Adobe Acrobat in my web application and replaced it with this new code, and then lived happily ever after.

From my limited understanding, the printer must have native PDF support built-in in order for it to be able to print PDFs in this manner.  The two printers I tested were manufactured by Xerox and HP.  I'm assuming that most modern business printers have the ability to print PDFs.

Tuesday, May 03, 2011 12:44:44 PM UTC :: Filed Under C# | Geek Tips

I've been spending the last few days trying to create a new build script utilizing Microsoft TFS 2010.   Part of my build includes the creation of MSI packages using InstallShield 2011.

When using a full version of InstallShield 2011, there is no TFS integration that I can find.  The TFS integration, as mentioned on Flexera's web site, appears to come only when you install the InstallShield LE that comes with Visual Studio and then you create an InstallShield Project within your Visual Studio solution.

To run InstallShield from within the TFS workflow, I'm using an InvokeProcess activity to call IsCmdBld.exe on the build agent.  After turning setting the Logging Verbosity to 'Diagnostic' on my build definition, I found the following error each time the call to IsCmdBld was performed:

ISDEV : fatal error -7159: The product license has expired or has not yet been initialized.

I logged into the build agent server and made sure that InstallShield was properly registered and working.   I also performed the MSI build on the build agent using the exact command used in the InvokeProcess activity, and it worked as expected.  After many hours of searching the web and trail-and-error, I determined that the error message was likely wrong.

The TFS service on the build agent I was connected to was running under the NT AUTHORITY\Network Service.  Apparently any calls to IsCmdBld require administrative rights, which this account did not have.  I then found out that one of my coworkers had created a domain account specifically for the build agents that was a domain administrator account.   Once he configured the build agent to run under that account, the -7159 error went away.

Tuesday, April 12, 2011 2:20:11 AM UTC :: Filed Under Christianity

Being my first week with my new Lenovo W520 ThinkPad laptop, I’ve been surfing “to the ends of the Internet” trying to find out more information about this laptop that few people own so far.  In my searches, I found the following image from this ThinkPad blog post rather interesting:

Yamato Thinking » Blog Archive » Pray for JAPAN from ThinkPad

What I find particularly interesting is that a corporation would actually suggesting praying for it’s home country.  Perhaps in Japan, they don’t shun religious expression from the corporate workplace like they do here in America… especially if you’re a Christian.  When I see they word “pray”, of course I think about praying to the one God through his Son, Jesus Christ.  However, since Lenovo is a Japanese company and Japan is mostly a Buddhist and Shinto nation, “pray” probably means something entirely different to them than it does to me.

None-the-less, I agree with the little red TrackPoint nubbin… we should pray for Japan.

Wednesday, December 08, 2010 3:53:00 AM UTC :: Filed Under Mobile

SamsungFocusAlthough I like the PC-like features of my Windows 7 Phone, the actual phone part isn't all that great.  As of recently, the phone part stopped working entirely!

People were telling me that they tried calling but I didn't answer when I knew darn well I was available.  Sure enough, I tried calling my phone from a different phone and it never picked-up even though it said I had three bars of reception.   I was also noticing that I often had no bars of reception.   A restart of the phone would get some reception again, but it was hit-or-miss as to whether I could receive calls or even make them.

I eventually called AT&T and they determined the phone was defective.  Contrary to all the negative comments I've read about AT&T support online, I found their support to be very good.  I had no wait to speak to a real person and within a matter of minutes, they had me setup for a RMA to get a new phone shipped to me.  Apparently the phone has a one year warranty, of which I'm now thankful for as I'm not willing to shell-out over $400 for a new phone.

The AT&T RMA process is very well done.   They sent me a box with a bare-bones phone (i.e., they sent just the phone body with no cover, no battery, etc.)  I swapped-out your broken phone with the new one, put the old one back in the box it came in, stuck the return label on the box, and put it back in the mail.   The only negative part about the whole experience is that the phone was shipped via the United States Postal Service which means it took forever to get to my house.  The USPS shipping was free and AT&T did offer express shipping for a small fee, so I can only blame myself for having to wait so long.

Wednesday, April 28, 2010 3:34:15 AM UTC :: Filed Under Fitness

Unless you swim naked, you’ll probably need to buy a few items.   Over the years, I’ve found there are a few ‘must have’ items and a few items that are complete wastes of money.   Keep in-mind that that I consider myself a fast recreational swimmer, but I’m not a racer.   Products that give me a high ‘bang-for-the-bucket’ are usually my favorites.

Swim Suits

Being a guy, I can only speak about my experience with men’s suits.   Obviously, if you want to swim fast, wearing a pair of surfer shorts is about the equivalent of riding your bike with a parachute tied to the seat.   You’ll get great exercise wearing them, but you won’t likely be fast.   I personally prefer the ‘jammer’ style short which happens to look about the same as my bicycling shorts that I wear in the summer.   I’m afraid I just can’t see myself wearing the Speedo-briefs.

Suit style aside, I’ve found that the ‘p’-word (polyester), actually is the better route to go.   I started out swimming with the more expensive Speedo suits that were mostly Lycra blends.   They looked nice and made me feel fast, but they didn’t last long before the chlorine started to wear them thin.   I tried the much cheaper Speedo jammers that are a polyester blend and I really like them.   One pair easily lasts a whole season of swimming without totally losing shape or getting thin spots.  The other benefit is that you can usually buy several pairs for the cost of one of the higher end Lycra suits.

Flip-Flops

Whatever you want to call them, make sure you wear some kind of foot protection when you’re not in the pool.   In addition to keeping you from slipping and falling, they also protect your feet from nasty funguses.   Have you ever had Athlete’s foot?  You really don’t want it, and there’s a real good chance you’ll get it if you don’t protect your feet on a public floor.

Goggles

It would be pretty hard to recommend a single pair of goggles that fits everyone, so I won’t.   When swimming indoors, I personally prefer a pair of clear lenses that don’t limit my peripheral vision… which usually means I like goggles that make me look like a dork.

I also prefer goggles with an adjustable nose bridge.   I’ve never had any luck with the goggles that have the fixed nose bridge, they never fit right.

Most goggles come with some kind of anti-fog coating that never seems to last very long.   To extend the life of the coating, I highly recommend not getting the inside of the goggles wet with pool water when possible.   The chlorine seems to quickly remove the coating.   When my newer goggles fog-up, I usually take them off for a few minutes to let the fog go away, then I put them back on.   I’ve also used the Tyr anti-fog solution, but it doesn’t seem to do anything.   If someone has a better way to keep goggles from fogging-up, I’m all ears!

When you find a pair of goggles you really like, I’d suggest buying like 50 pairs of them.    It seems like as soon as you find a pair you like, the company stops making them and then you have to start all over again.

Swim Caps

If you’re not wearing a swim cap, well, I feel sorry for your hair.   It took me weeks before I was used to wearing a cap, but now I feel naked without one.  

I recommend a silicone cap over the latex kind.   The silicone caps last longer and don’t seem to pull on your hair as much.  I haven’t tried a Lycra cap yet, but knowing that Lycra suits don’t last long, I wouldn’t expect a Lycra cap would either.

Wednesday, April 28, 2010 3:07:42 AM UTC :: Filed Under Fitness

If you’re swimming in a pool for any length of time, your hair is going to take a beating.  It won’t be long before your hair is going to look and feel like straw.   So what do you do about it?  Well, here’s what works for me.

First, buy a silicone swim cap.   Yeah, I know they feel weird and are hard to put on, but they’ll help save your hair.   They’re made of several different materials, such as Lycra, silicone, and latex and I’ve tried the latter two.   I highly recommend the silicone cap over the latex.   It’ll cost you just a little but more, but it’ll last a lot longer and it won’t pull your hair out (as much).  

I haven’t tried a Lycra cap yet, but since Lycra based suits don’t last very long in a pool, I can’t imagine a cap would either.   I found latex caps to be very hard to get on, they pull my hair, and they don’t last long before they rip apart.

Second, take a shower before you swim.   Yes, I know, you should be doing that anyway.   However, I’m kind of shocked and somewhat disgusted at how many people skip the showers and just jump in.  Yuck.   Anyway, when you shower, make sure you get your hair good and wet to absorb all the water it can.  Then put your swim cap on.   What this does is it keeps your hair from absorbing all the heavily chlorinated pool water because it’s already full of the shower water.   Granted, the shower water might have some chlorine in it too, but not as much as the pool.

Third, use a moisturizing conditioner when you get out of the pool.   I’ve tried various, expensive shampoos that said they were specifically created for removing chlorine from my hair.  They were all worthless.   I don’t use any shampoo when I get out of the pool, I just douse my hair with moisturizing conditioner, leave it in for a while, then rinse it out.   Since I usually swim in the late evening, I usually wash my hair the next morning in the sink and skip a shower.  That gives my skin a chance to catch-up and not get too dry.

Let me know if you find these tips useful and enjoy your swim!

Navigation
On this page....
Search
Archives
<February 2012>
SunMonTueWedThuFriSat
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910
Categories
Contact me
Send mail to the author(s) Contact Todd M. Taylor