All was well as long as no other app also used the CutePDF Writer to print a PDF file as it always defaulted the folder in the Save As dialog to the last folder used by any app. The main problem I had though was specifing the folder that the CutePDF Writer was going to save the PDF file to. But this approach had several problems including the unreliability of FindWindow, and what would happen if another application also happened to have a Save As dialog open at the same time. My first attempt, which worked fairly well, was to simply find the "Save As" dialog using the FindWindow API, and simulating a click on the Save button by posting a BN_CLICKED command to the dialog. I already had the CutePDF Writer installed on my system, so it was only natural that I use it. So I decided to it would be better to simply print to a PDF file that I could make a hard copy of if I needed one. I used to have it print out on paper, but I found that to be a waste of paper as I would usually only read it once and then toss it. It's job is to print out a summary report of the previous days activities. I have a small app that is scheduled to run every morning at 5:00 AM. This class makes it possible to use the free CutePDF Writer without user interaction. The shortcoming is that the "Save As" dialog always pops up so it is impossible to print to a PDF file without user interaction. This article presents a class that is a hack around a shortcoming in the free CutePDF Writer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |