Issue with opening PDF file from FilePro
Bill Campbell
bill at celestial.com
Thu May 28 10:28:00 PDT 2009
On Thu, May 28, 2009, Kenneth Brody wrote:
>Bob Rasmussen wrote:
>[...]
>>> 2. How do I check if a file can be opened in R/W mode in FP?
>>
>> I don't know this one.
>
>As someone else answered, use OPEN(filename,"rw") and check for success or
>failure.
>
>Might I suggest a "better" solution, which requires a change to PrintWizard?
> I have seen numerous cases where the program generating the file uses a
>temporary filename while the job is running, and then renames it to the
>final name once it is complete.
>
>For example, PrintWizard creates "~~PW####.tmp" (where "####" is some unique
>number), and writes the PDF output there. Once you have a complete PDF file
>generated, you close the file and rename it "whatever.pdf".
This is pretty standard practice when creating/updating files,
particularly where one needs to do it as an ``atomic'' process
such that the file, when visible, is intact and consistent.
As an example, the rsync program basically does binary diffs to
``patch'' an existing file, creating a new version that isn't
normally visible (e.g. it starts with '.filename'), then does a
*nix ``mv'' or rename command when the file is complete.
Bill
--
INTERNET: bill at celestial.com Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way
Voice: (206) 236-1676 Mercer Island, WA 98040-0820
Fax: (206) 232-9186 Skype: jwccsllc (206) 855-5792
If you make yourselves sheep, the wolves will eat you -- Benjamin Franklin
More information about the Filepro-list
mailing list