detecting the pdf module

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

detecting the pdf module

Postby mga » Fri Oct 27, 2006 10:15 pm

is there a reliable way to tell using code if the pdf module is installed?
mga
 
Posts: 2
Joined: Thu Oct 05, 2006 11:06 pm
Location: nm

Postby IDEAL Software Support » Mon Oct 30, 2006 6:17 pm

You could read the PATH environment variable and check whether you find the vpdf3236.dll in any of those directories.

But why do you want to do that? VPE returns VERR_MOD_VPDF, if the PDF Export Module could not be loaded, when trying to export to PDF.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm

detecting the pdf module

Postby mga » Mon Oct 30, 2006 7:09 pm

why would i want to detect if the pdf module is available? ordinarily i wouldnt but in this case, i construct the document file name based on what i can tell about the users environment and the file name determines which type of file gets written. so, if i just assume that the pdf module is available and correctly installed and i do a WriteDoc("mypdf.pdf") then i end up with a file called mypdf.pdf written to disk even if the pdf module is not there. WriteDoc() does tell me that the write failed but i still have to clean up the unwanted, empty pdf file. i can do that. its no big deal but i would rather not have to do that. maybe the left over file is a consequence of WriteDoc() trying to clean up after itself and not being able to for some reason. whether there is a bug in WriteDoc() or whether the problem only occurs if i run VPE from the Progress 4GL doesnt matter to me because if i can find out if the pdf module is available before constructing the filename then i can avoid this problem.
mga
 
Posts: 2
Joined: Thu Oct 05, 2006 11:06 pm
Location: nm

Postby IDEAL Software Support » Tue Oct 31, 2006 12:40 am

We checked the code and you are right: VPE creates always the file, but does not delete it in case of an error. This is good for us to analyze problems in the debug build, but annoying for end users in the release build. It will be fixed in the next version.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1621
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 68 guests