This now works. Sorry but I may have been using the wrong version of the dll file before which may have explained why is wasn't working.
I also had to fix a fault in the WPViewPDF1 unit. For TWPPDFViewOption it had values of wpPageSelection and wpPageMultiSelection but the code referred to wpShowPageSelection and wpShowPageMultiSelection.
I made a test right now - it works. Please try the latest setup (V1.46.5) suince it includes a change inn the make JPEG procedure. Maybe it was a problem there. If this does not help please send me PDF.
I am using WPViewPDF 1.46 and trying to create a jpeg file using the CommandStr(COMPDF_MakeJPEG, filename) method and I always get a -1 result. Using COMPDF_MakeEMF works fine.